<div *ngIf="loginForm.controls['userName'].errors.required">{{'PAGE.LOGIN.USERNAMEVALIDMESSAGE' | translate}}</div>
</div>
<div class="wrap-input">
- <input autocomplete="off" class="input-control" type="password" formControlName="password" placeholder="{{ 'PAGE.LOGIN.PASSWORD' | translate }}"
- />
+ <input autocomplete="off" class="input-control" [type]="visiblePassword?'text':'password'" formControlName="password" placeholder="{{ 'PAGE.LOGIN.PASSWORD' | translate }} "/>
<span class="input-icon">
<i class="fa fa-lock" aria-hidden="true"></i>
</span>
+ <i *ngIf="loginForm.controls['password'].value" class="input-icon-eye" (click)="onShowPassword()" [ngClass]="visiblePassword?'fa fa-eye-slash':'fa fa-eye'"></i>
</div>
<div *ngIf="submitted && loginForm.controls['password'].errors" class="input-validation-msg">
<div *ngIf="loginForm.controls['password'].errors.required">{{'PAGE.LOGIN.PASSWORDVALIDMESSAGE' | translate}}</div>
pointer-events: none;
color: $gray-600;
}
+ .input-icon-eye {
+ @include font(null, 13px, null);
+ @include flexbox(flex, null, null, null, center, null);
+ @include roundedCorners(25);
+ @include position_value(absolute, null, null, 0, 0);
+ left: 245px;
+ top: 4px;
+ @include transition(all, 0.5s, null, null);
+ color: $gray-600;
+ cursor: pointer;
+ }
+ input::-ms-reveal, input::-ms-clear {
+ display: none;
+ }
}
.submit-btn {
@include background(null, $white, null, null, null);
/** contains the passwordIn observable value @public */
public changePassword: boolean;
+ /** To show the visiblity of password @public */
+ public visiblePassword: boolean;
+
/** Utilizes auth service for any auth operations @private */
private authService: AuthenticationService;
}
}
+ /** To Show or Hide the Password @public */
+ public onShowPassword(): void {
+ this.visiblePassword = !this.visiblePassword;
+ }
+
/** To display password expiry Toaster with required data @public */
public passwordExpiryToaster(): void {
if ((this.accountNoOfDays === '1' && this.passwordNoOfDays === '1') ||