diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-09-09 22:16:51 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-09-09 22:16:51 +0200 |
commit | 4b2f33f3c6d109365090b08244d7f99ad4e69025 (patch) | |
tree | 700d3e8e14efc4172f754d75c041ec507100e897 /client/src/app/account/account.component.html | |
parent | ab32b0fc805b92c5a1d7ac5901cb1a38e94622ca (diff) | |
download | PeerTube-4b2f33f3c6d109365090b08244d7f99ad4e69025.tar.gz PeerTube-4b2f33f3c6d109365090b08244d7f99ad4e69025.tar.zst PeerTube-4b2f33f3c6d109365090b08244d7f99ad4e69025.zip |
Client: reactive forms
Diffstat (limited to 'client/src/app/account/account.component.html')
-rw-r--r-- | client/src/app/account/account.component.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/client/src/app/account/account.component.html b/client/src/app/account/account.component.html index 4797fa914..5a8847acd 100644 --- a/client/src/app/account/account.component.html +++ b/client/src/app/account/account.component.html | |||
@@ -3,25 +3,25 @@ | |||
3 | <div *ngIf="information" class="alert alert-success">{{ information }}</div> | 3 | <div *ngIf="information" class="alert alert-success">{{ information }}</div> |
4 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> | 4 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> |
5 | 5 | ||
6 | <form role="form" (ngSubmit)="changePassword()" [formGroup]="changePasswordForm"> | 6 | <form role="form" (ngSubmit)="changePassword()" [formGroup]="form"> |
7 | <div class="form-group"> | 7 | <div class="form-group"> |
8 | <label for="new-password">New password</label> | 8 | <label for="new-password">New password</label> |
9 | <input | 9 | <input |
10 | type="password" class="form-control" name="new-password" id="new-password" | 10 | type="password" class="form-control" id="new-password" |
11 | [(ngModel)]="newPassword" #newPasswordInput="ngModel" | 11 | formControlName="new-password" |
12 | > | 12 | > |
13 | <div [hidden]="changePasswordForm.controls['new-password'].valid || changePasswordForm.controls['new-password'].pristine" class="alert alert-warning"> | 13 | <div *ngIf="formErrors['new-password']" class="alert alert-danger"> |
14 | The password should have more than 5 characters | 14 | {{ formErrors['new-password'] }} |
15 | </div> | 15 | </div> |
16 | </div> | 16 | </div> |
17 | 17 | ||
18 | <div class="form-group"> | 18 | <div class="form-group"> |
19 | <label for="name">Confirm new password</label> | 19 | <label for="name">Confirm new password</label> |
20 | <input | 20 | <input |
21 | type="password" class="form-control" name="new-confirmed-password" id="new-confirmed-password" | 21 | type="password" class="form-control" id="new-confirmed-password" |
22 | [(ngModel)]="newConfirmedPassword" #newConfirmedPasswordInput="ngModel" | 22 | formControlName="new-confirmed-password" |
23 | > | 23 | > |
24 | </div> | 24 | </div> |
25 | 25 | ||
26 | <input type="submit" value="Change password" class="btn btn-default" [disabled]="!changePasswordForm.valid"> | 26 | <input type="submit" value="Change password" class="btn btn-default" [disabled]="!form.valid"> |
27 | </form> | 27 | </form> |