Skip to content
Snippets Groups Projects
Commit 72a52220 authored by Tom Käsler's avatar Tom Käsler
Browse files

Use type 'email' on mat input

parent a44ff792
No related merge requests found
<form (ngSubmit)="resetPassword(email.value)" fxLayout="column" fxLayoutAlign="space-around" <form (ngSubmit)="resetPassword(email.value)" fxLayout="column" fxLayoutAlign="space-around"
fxLayoutGap="10px"> fxLayoutGap="10px">
<mat-form-field class="input-block"> <mat-form-field class="input-block">
<input matInput #email placeholder="{{ 'password-reset.email' | translate }}" [formControl]="usernameFormControl" <input matInput type="email" #email placeholder="{{ 'password-reset.email' | translate }}" [formControl]="usernameFormControl"
[errorStateMatcher]="matcher" name="email"/> [errorStateMatcher]="matcher" name="email"/>
<mat-error *ngIf="usernameFormControl.hasError('required')"> <mat-error *ngIf="usernameFormControl.hasError('required')">
{{ 'password-reset.email-required' | translate }} {{ 'password-reset.email-required' | translate }}
......
<form (ngSubmit)="register(userName.value, userPassword1.value)" fxLayout="column" <form (ngSubmit)="register(userName.value, userPassword1.value)" fxLayout="column"
fxLayoutAlign="space-around" fxLayoutGap="10px"> fxLayoutAlign="space-around" fxLayoutGap="10px">
<mat-form-field class="input-block"> <mat-form-field class="input-block">
<input matInput #userName placeholder="{{ 'register.email' | translate }}" [formControl]="usernameFormControl" <input matInput type="email" #userName placeholder="{{ 'register.email' | translate }}" [formControl]="usernameFormControl"
[errorStateMatcher]="matcher"> [errorStateMatcher]="matcher">
<mat-error *ngIf="usernameFormControl.hasError('email') && !usernameFormControl.hasError('required')"> <mat-error *ngIf="usernameFormControl.hasError('email') && !usernameFormControl.hasError('required')">
{{ 'register.email-invalid' | translate }} {{ 'register.email-invalid' | translate }}
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field class="input-block"> <mat-form-field class="input-block">
<input matInput #userName2 placeholder="{{ 'register.email-verify' | translate }}" [formControl]="username2FormControl" <input matInput type="email" #userName2 placeholder="{{ 'register.email-verify' | translate }}" [formControl]="username2FormControl"
[errorStateMatcher]="matcher"> [errorStateMatcher]="matcher">
<mat-error *ngIf="username2FormControl.hasError('emailIsEqual') && !username2FormControl.hasError('required')"> <mat-error *ngIf="username2FormControl.hasError('emailIsEqual') && !username2FormControl.hasError('required')">
{{ 'register.email-unmatch' | translate }} {{ 'register.email-unmatch' | translate }}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment