diff --git a/src/app/shared/change-password-dialog/change-password-dialog.component.html b/src/app/shared/change-password-dialog/change-password-dialog.component.html index 8b69ec014..6f8bd585f 100644 --- a/src/app/shared/change-password-dialog/change-password-dialog.component.html +++ b/src/app/shared/change-password-dialog/change-password-dialog.component.html @@ -5,7 +5,18 @@
{{ 'labels.inputs.Password' | translate }} - + + {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is required' | translate }} @@ -36,7 +47,18 @@ {{ 'labels.inputs.Repeat Password' | translate }} - + + {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.required' | translate }} diff --git a/src/app/shared/change-password-dialog/change-password-dialog.component.ts b/src/app/shared/change-password-dialog/change-password-dialog.component.ts index acea9200d..8c92c887c 100644 --- a/src/app/shared/change-password-dialog/change-password-dialog.component.ts +++ b/src/app/shared/change-password-dialog/change-password-dialog.component.ts @@ -16,6 +16,11 @@ import { PasswordsUtility } from 'app/core/utils/passwords-utility'; export class ChangePasswordDialogComponent implements OnInit { /** Change Password Form */ changePasswordForm: any; + /** Password input field type. */ + passwordInputType: string[] = [ + 'password', + 'password' + ]; /** * @param {MatDialogRef} dialogRef Component reference to dialog. @@ -32,6 +37,15 @@ export class ChangePasswordDialogComponent implements OnInit { this.createChangePasswordForm(); } + /** + * Toggles the visibility of the password input field. + * + * Changes the input type between 'password' and 'text'. + */ + togglePasswordVisibility(index: number) { + this.passwordInputType[index] = this.passwordInputType[index] === 'password' ? 'text' : 'password'; + } + /** Change Password form */ createChangePasswordForm() { this.changePasswordForm = this.formBuilder.group({