UI: Add input placeholder
This commit is contained in:
parent
afc3820b79
commit
8bccd857eb
@ -37,7 +37,11 @@
|
|||||||
<form [formGroup]="smsConfigForm" (ngSubmit)="nextStep()">
|
<form [formGroup]="smsConfigForm" (ngSubmit)="nextStep()">
|
||||||
<p class="mat-body step-description input" translate>security.2fa.dialog.sms-step-description</p>
|
<p class="mat-body step-description input" translate>security.2fa.dialog.sms-step-description</p>
|
||||||
<div fxLayout="row" fxLayoutAlign="space-between center" fxLayoutGap="8px">
|
<div fxLayout="row" fxLayoutAlign="space-between center" fxLayoutGap="8px">
|
||||||
<tb-phone-input fxFlex formControlName="phone" [floatLabel]="'never'"></tb-phone-input>
|
<tb-phone-input fxFlex
|
||||||
|
formControlName="phone"
|
||||||
|
[floatLabel]="'never'"
|
||||||
|
[placeholder]="'security.2fa.dialog.sms-step-label'">
|
||||||
|
</tb-phone-input>
|
||||||
<button mat-raised-button
|
<button mat-raised-button
|
||||||
type="submit"
|
type="submit"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
@ -28,12 +28,12 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</div>
|
</div>
|
||||||
<mat-form-field class="phone-input" [appearance]="appearance" [floatLabel]="floatLabel">
|
<mat-form-field class="phone-input" [appearance]="appearance" [floatLabel]="floatLabel">
|
||||||
<mat-label translate>security.2fa.dialog.sms-step-label</mat-label>
|
<mat-label>{{ placeholder | translate }}</mat-label>
|
||||||
<input
|
<input
|
||||||
formControlName="phoneNumber"
|
formControlName="phoneNumber"
|
||||||
type="tel"
|
type="tel"
|
||||||
matInput
|
matInput
|
||||||
placeholder="{{ 'security.2fa.dialog.sms-step-label' | translate }}"
|
placeholder="{{ placeholder | translate }}"
|
||||||
[pattern]="phoneNumberPattern"
|
[pattern]="phoneNumberPattern"
|
||||||
(focus)="focus()"
|
(focus)="focus()"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
|||||||
@ -61,6 +61,7 @@ export class PhoneInputComponent implements OnInit, ControlValueAccessor, Valida
|
|||||||
@Input() required = true;
|
@Input() required = true;
|
||||||
@Input() floatLabel: FloatLabelType = 'always';
|
@Input() floatLabel: FloatLabelType = 'always';
|
||||||
@Input() appearance: MatFormFieldAppearance = 'legacy';
|
@Input() appearance: MatFormFieldAppearance = 'legacy';
|
||||||
|
@Input() placeholder = 'phone-input.phone-input-label';
|
||||||
|
|
||||||
allCountries: Array<Country> = this.countryCodeData.allCountries;
|
allCountries: Array<Country> = this.countryCodeData.allCountries;
|
||||||
phonePlaceholder: string;
|
phonePlaceholder: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user