diff options
author | Jorropo <admin@jorropo.ovh> | 2018-09-04 16:34:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-04 17:11:48 +0200 |
commit | a94419a604f324305c9dbb607496a5bca9b63d04 (patch) | |
tree | dc647eb017dda542e770de59e503f86c3ef39c6d /client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html | |
parent | c75937d04f0a45b1ba169d28d0854ad33cfee900 (diff) | |
download | PeerTube-a94419a604f324305c9dbb607496a5bca9b63d04.tar.gz PeerTube-a94419a604f324305c9dbb607496a5bca9b63d04.tar.zst PeerTube-a94419a604f324305c9dbb607496a5bca9b63d04.zip |
Making password change erroring more friendly
If you leave the form but the 2 password is different a big red
boxappears to warn you (no need to click on the button).The submit
buttonis desactivated if the 2 password isn't the same.
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html index 767ef0336..913b570cb 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html | |||
@@ -6,6 +6,7 @@ | |||
6 | <input | 6 | <input |
7 | type="password" id="new-password" i18n-placeholder placeholder="New password" | 7 | type="password" id="new-password" i18n-placeholder placeholder="New password" |
8 | formControlName="new-password" [ngClass]="{ 'input-error': formErrors['new-password'] }" | 8 | formControlName="new-password" [ngClass]="{ 'input-error': formErrors['new-password'] }" |
9 | (change)="validateNewPassword()" (blur)="printAnError()" | ||
9 | > | 10 | > |
10 | <div *ngIf="formErrors['new-password']" class="form-error"> | 11 | <div *ngIf="formErrors['new-password']" class="form-error"> |
11 | {{ formErrors['new-password'] }} | 12 | {{ formErrors['new-password'] }} |
@@ -13,8 +14,8 @@ | |||
13 | 14 | ||
14 | <input | 15 | <input |
15 | type="password" id="new-confirmed-password" i18n-placeholder placeholder="Confirm new password" | 16 | type="password" id="new-confirmed-password" i18n-placeholder placeholder="Confirm new password" |
16 | formControlName="new-confirmed-password" | 17 | formControlName="new-confirmed-password" (change)="validateNewPassword()" (blur)="printAnError()" |
17 | > | 18 | > |
18 | 19 | ||
19 | <input type="submit" i18n-value value="Change password" [disabled]="!form.valid"> | 20 | <input type="submit" i18n-value value="Change password" [disabled]="!form.valid || unsendable"> |
20 | </form> | 21 | </form> |