fix: login form
This commit is contained in:
@@ -17,9 +17,10 @@
|
|||||||
<mat-label>{{ 'labels.inputs.Password' | translate }}</mat-label>
|
<mat-label>{{ 'labels.inputs.Password' | translate }}</mat-label>
|
||||||
<input matInput type="{{ passwordInputType }}" formControlName="password" />
|
<input matInput type="{{ passwordInputType }}" formControlName="password" />
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
mat-button
|
mat-button
|
||||||
*ngIf="loginForm.controls.password.value && !loading"
|
|
||||||
matSuffix
|
matSuffix
|
||||||
|
*ngIf="loginForm.controls.password.value && !loading"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
(mousedown)="togglePasswordVisibility()"
|
(mousedown)="togglePasswordVisibility()"
|
||||||
(mouseup)="togglePasswordVisibility()"
|
(mouseup)="togglePasswordVisibility()"
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
<fa-icon *ngIf="passwordInputType === 'text'" icon="eye-slash"></fa-icon>
|
<fa-icon *ngIf="passwordInputType === 'text'" icon="eye-slash"></fa-icon>
|
||||||
</button>
|
</button>
|
||||||
<mat-error *ngIf="loginForm.controls.password.hasError('required')">
|
<mat-error *ngIf="loginForm.controls.password.hasError('required')">
|
||||||
{{ 'labels.inputs.Password' | translate }} <strong>{{ 'labels.commons.is required' | translate }}</strong>
|
{{ 'labels.inputs.Password' | translate }} <strong>{{ 'labels.commons.pass is required' | translate }}</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export class LoginFormComponent implements OnInit {
|
|||||||
* Changes the input type between 'password' and 'text'.
|
* Changes the input type between 'password' and 'text'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
togglePasswordVisbility() {
|
togglePasswordVisibility() {
|
||||||
this.passwordInputType = this.passwordInputType === 'password' ? 'text' : 'password';
|
this.passwordInputType = this.passwordInputType === 'password' ? 'text' : 'password';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -772,6 +772,7 @@
|
|||||||
"is": "is",
|
"is": "is",
|
||||||
"Is": "is",
|
"Is": "is",
|
||||||
"is required": "is required",
|
"is required": "is required",
|
||||||
|
"pass is required": "is required(min length 8)",
|
||||||
"least one uppercase": "least one uppercase",
|
"least one uppercase": "least one uppercase",
|
||||||
"lowercase and special character": "lowercase and special character",
|
"lowercase and special character": "lowercase and special character",
|
||||||
"must be": "must be",
|
"must be": "must be",
|
||||||
|
|||||||
Reference in New Issue
Block a user