From 72a52220a967093469c3438d6107a3742be1c30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20K=C3=A4sler?= <tom.kaesler@mni.thm.de> Date: Tue, 11 Jun 2019 14:32:42 +0200 Subject: [PATCH] Use type 'email' on mat input --- .../_dialogs/password-reset/password-reset.component.html | 2 +- .../components/home/_dialogs/register/register.component.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/components/home/_dialogs/password-reset/password-reset.component.html b/src/app/components/home/_dialogs/password-reset/password-reset.component.html index 3f6f8c121..e91e73009 100644 --- a/src/app/components/home/_dialogs/password-reset/password-reset.component.html +++ b/src/app/components/home/_dialogs/password-reset/password-reset.component.html @@ -1,7 +1,7 @@ <form (ngSubmit)="resetPassword(email.value)" fxLayout="column" fxLayoutAlign="space-around" fxLayoutGap="10px"> <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"/> <mat-error *ngIf="usernameFormControl.hasError('required')"> {{ 'password-reset.email-required' | translate }} diff --git a/src/app/components/home/_dialogs/register/register.component.html b/src/app/components/home/_dialogs/register/register.component.html index 4bab2f8cc..16dfb4694 100644 --- a/src/app/components/home/_dialogs/register/register.component.html +++ b/src/app/components/home/_dialogs/register/register.component.html @@ -1,7 +1,7 @@ <form (ngSubmit)="register(userName.value, userPassword1.value)" fxLayout="column" fxLayoutAlign="space-around" fxLayoutGap="10px"> <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"> <mat-error *ngIf="usernameFormControl.hasError('email') && !usernameFormControl.hasError('required')"> {{ 'register.email-invalid' | translate }} @@ -12,7 +12,7 @@ </mat-form-field> <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"> <mat-error *ngIf="username2FormControl.hasError('emailIsEqual') && !username2FormControl.hasError('required')"> {{ 'register.email-unmatch' | translate }} -- GitLab