[ADF-5163] Fix placeholder on Form widgets (#5812)

This commit is contained in:
davidcanonieto
2020-06-24 15:18:33 +01:00
committed by GitHub
parent c0d1ef2216
commit ed68ebb751
11 changed files with 23 additions and 6 deletions

View File

@@ -12,7 +12,7 @@
[max]="maxDate"
(focusout)="onDateChanged($event.srcElement.value)"
(dateChange)="onDateChanged($event)"
placeholder="{{field.placeholder}}">
[placeholder]="field.placeholder">
<mat-datetimepicker-toggle matSuffix [for]="datetimePicker" [disabled]="field.readOnly"></mat-datetimepicker-toggle>
</mat-form-field>
<error-widget [error]="field.validationSummary"></error-widget>

View File

@@ -5,7 +5,9 @@
.mat-form-field-suffix {
top: 26px;
}
.mat-form-field-label-wrapper {
top: 20px;
}
}
}

View File

@@ -11,7 +11,7 @@
[max]="maxDate"
(focusout)="onDateChanged($event.srcElement.value)"
(dateChange)="onDateChanged($event)"
placeholder="{{field.placeholder}}">
[placeholder]="field.placeholder">
<mat-datepicker-toggle matSuffix [for]="datePicker" [disabled]="field.readOnly" ></mat-datepicker-toggle>
</mat-form-field>
<error-widget [error]="field.validationSummary"></error-widget>

View File

@@ -5,5 +5,8 @@
.mat-form-field-suffix {
top: 26px;
}
.mat-form-field-label-wrapper {
top: 20px;
}
}
}

View File

@@ -11,7 +11,7 @@
[(ngModel)]="field.value"
(ngModelChange)="onFieldChanged(field)"
[disabled]="field.readOnly || readOnly"
placeholder="{{field.placeholder}}">
[placeholder]="field.placeholder">
</textarea>
</mat-form-field>
<div *ngIf="field.maxLength > 0" class="adf-multiline-word-counter">

View File

@@ -2,6 +2,9 @@
&-multiline-text-widget {
width: 100%;
.mat-form-field-label-wrapper {
top: 20px;
}
}
&-multiline-word-counter {

View File

@@ -12,7 +12,7 @@
[(ngModel)]="field.value"
(ngModelChange)="onFieldChanged(field)"
[disabled]="field.readOnly"
placeholder="{{field.placeholder}}">
[placeholder]="field.placeholder">
</mat-form-field>
<error-widget [error]="field.validationSummary" ></error-widget>
<error-widget *ngIf="isInvalidFieldRequired()" required="{{ 'FORM.FIELD.REQUIRED' | translate }}"></error-widget>

View File

@@ -3,5 +3,8 @@
.adf {
&-number-widget {
width: 100%;
.mat-form-field-label-wrapper {
top: 20px;
}
}
}

View File

@@ -3,5 +3,8 @@
.adf {
&-text-widget {
width: 100%;
.mat-form-field-label-wrapper {
top: 20px;
}
}
}

View File

@@ -11,7 +11,7 @@
[max]="maxDate"
(focusout)="onDateChanged($event.srcElement.value)"
(dateChange)="onDateChanged($event)"
placeholder="{{field.placeholder}}">
[placeholder]="field.placeholder">
<mat-datepicker-toggle matSuffix [for]="datePicker" [disabled]="field.readOnly" ></mat-datepicker-toggle>
</mat-form-field>
<error-widget [error]="field.validationSummary"></error-widget>

View File

@@ -4,5 +4,8 @@
.mat-form-field-suffix {
top: 26px;
}
.mat-form-field-label-wrapper {
top: 20px;
}
}
}