Skip to content
Snippets Groups Projects
Commit 51577494 authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FEAT #16839 TIME 0:55 display password rules for user administration

parent a7f4f543
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,7 @@
<ion-input [type]="hideNewPassword ? 'password' : 'text'" name="newPasswordRest"
[(ngModel)]="passwordRest.newPassword" (ionChange)="checkPasswordValidity(passwordRest.newPassword)">
</ion-input>
<ion-note color="danger" *ngIf="this.handlePassword.error && passwordRest.newPassword.length > 0"> {{ this.handlePassword.errorMsg | translate}}</ion-note>
</ion-item>
<ion-item style="align-items: center;" *ngIf="user.isRest">
<ion-button slot="end" fill="clear" color="primary"
......@@ -82,10 +83,10 @@
<ion-label color="secondary" position="floating">{{'lang.passwordConfirmation' | translate}}</ion-label>
<ion-input [type]="hideNewPasswordConfirm ? 'password' : 'text'" name="passwordConfirmation"
[(ngModel)]="passwordRest.passwordConfirmation"></ion-input>
<ion-note color="danger" *ngIf="passwordRest.passwordConfirmation !== passwordRest.newPassword">
<ion-note color="danger" *ngIf="passwordRest.passwordConfirmation !== passwordRest.newPassword && passwordRest.passwordConfirmation.length > 0">
{{'lang.passwordNotMatch' | translate}}</ion-note>
<ion-note color="success"
*ngIf="passwordRest.passwordConfirmation === passwordRest.newPassword && passwordRest.newPassword.length > 0 && passwordRest.passwordConfirmation.length> 0">
*ngIf="passwordRest.passwordConfirmation === passwordRest.newPassword && passwordRest.newPassword.length > 0 && passwordRest.passwordConfirmation.length> 0 && !this.handlePassword.error">
{{'lang.samePassword' | translate}}</ion-note>
</ion-item>
<ion-item text-center lines="none" style="position: sticky;bottom:0px;z-index:1;">
......
......@@ -113,7 +113,9 @@ export class UserComponent implements OnInit {
this.userClone = JSON.parse(JSON.stringify(this.user));
this.title = this.user.firstname + ' ' + this.user.lastname;
if (this.user.isRest) {
this.getPassRules({ checked: true });
this.getPassRules({ detail: {
checked: true
} });
}
},
});
......@@ -221,7 +223,7 @@ export class UserComponent implements OnInit {
}
getPassRules(ev: any) {
if (ev.checked) {
if (ev.detail.checked) {
this.handlePassword.error = false;
this.handlePassword.errorMsg = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment