[DEV] simplify password change

This commit is contained in:
Edouard DUPIN 2023-01-08 12:22:43 +01:00
parent 39e463647e
commit 9d9fcc3eb5
2 changed files with 3 additions and 37 deletions

View File

@ -14,7 +14,7 @@
placeholder="Enter current password"
[hasError]="passwordOldState !== true"
(changeValue)="checkPasswordOld($event)"></app-password-entry>
<div class="error color-shadow-black" *ngIf="passwordOldState !== true && passwordOldState !== false">{{passwordOldState}}</div>
<app-error-message-state [value]="passwordOldState"></app-error-message-state>
<!-- New password section -->
<label for="password1"><b>New password</b></label>
@ -23,7 +23,7 @@
placeholder="Enter new password"
[hasError]="password1State !== true"
(changeValue)="checkPassword($event)"></app-password-entry>
<div class="error color-shadow-black" *ngIf="password1State !== true && password1State !== false">{{password1State}}</div>
<app-error-message-state [value]="password1State"></app-error-message-state>
<!-- New password section (verify) -->
<label for="password2"><b>New password (2<sup>nd</sup> time)</b></label>
@ -32,7 +32,7 @@
placeholder="Enter new password (verify)"
[hasError]="password2State !== true"
(changeValue)="checkPassword2($event)"></app-password-entry>
<div class="error color-shadow-black" *ngIf="password2State !== true && password2State !== false">{{password2State}}</div>
<app-error-message-state [value]="password2State"></app-error-message-state>
</div>
<div class="container" *ngIf="updateState==='filling'">
<button class="button cancel color-button-cancel color-shadow-black" (click)="onCancel()">Cancel</button>

View File

@ -60,37 +60,3 @@ img.avatar {
}
.error {
background-color: #f44336;
position: absolute;
z-index: 10;
display: block;
max-width: 450px;
padding: 5px 8px;
margin: 2px 0 0;
font-size: 16px;
font-weight: 400;
border-style: solid;
border-width: 0px;
box-sizing: border-box;
&:after,
&:before {
bottom: 100%;
left: 25px;
border: solid transparent;
content: ' ';
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
&:after {
border-bottom-color: #f44336;
border-width: 10px;
margin-left: -10px;
}
}