aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-20 16:42:21 +0200
committerChocobozzz <me@florianbigard.com>2022-06-20 16:42:21 +0200
commit75084782b767f51f6158ada1984cf339c6302960 (patch)
tree178904ed08269de95683a063623d17cf87e56fad /client/src/app/+my-account
parent9bc3622320dc43474ce4b60c222ec25e6e657b97 (diff)
downloadPeerTube-75084782b767f51f6158ada1984cf339c6302960.tar.gz
PeerTube-75084782b767f51f6158ada1984cf339c6302960.tar.zst
PeerTube-75084782b767f51f6158ada1984cf339c6302960.zip
Handle input error in custom input text
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html12
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html36
2 files changed, 16 insertions, 32 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html
index c9f9d8f55..d85be846b 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html
+++ b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html
@@ -25,14 +25,10 @@
25 </div> 25 </div>
26 26
27 <div class="form-group"> 27 <div class="form-group">
28 <my-input-text formControlName="password" 28 <my-input-text
29 id="password" 29 formControlName="password" id="password" i18n-placeholder placeholder="Current password"
30 i18n-placeholder placeholder="Current password" 30 [formError]="formErrors['password']" autocomplete="current-password"
31 [ngClass]="{ 'input-error': formErrors['password'] }" 31 ></my-input-text>
32 autocomplete="current-password"></my-input-text>
33 <div *ngIf="formErrors['password']" class="form-error">
34 {{ formErrors['password'] }}
35 </div>
36 </div> 32 </div>
37 33
38 <input type="submit" i18n-value value="Change email" [disabled]="!form.valid"> 34 <input type="submit" i18n-value value="Change email" [disabled]="!form.valid">
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 f1deb4273..f961d3294 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
@@ -3,32 +3,20 @@
3<form role="form" (ngSubmit)="changePassword()" [formGroup]="form"> 3<form role="form" (ngSubmit)="changePassword()" [formGroup]="form">
4 4
5 <label i18n for="current-password">Change password</label> 5 <label i18n for="current-password">Change password</label>
6 <my-input-text formControlName="current-password" 6 <my-input-text
7 inputId="current-password" 7 formControlName="current-password" inputId="current-password" i18n-placeholder placeholder="Current password"
8 i18n-placeholder placeholder="Current password" 8 [formError]="formErrors['current-password']" autocomplete="current-password"
9 [ngClass]="{ 'input-error': formErrors['current-password'] }" 9 ></my-input-text>
10 autocomplete="current-password"></my-input-text>
11 <div *ngIf="formErrors['current-password']" class="form-error">
12 {{ formErrors['current-password'] }}
13 </div>
14 10
15 <my-input-text formControlName="new-password" 11 <my-input-text
16 inputId="new-password" 12 formControlName="new-password" inputId="new-password" i18n-placeholder placeholder="New password"
17 i18n-placeholder placeholder="New password" 13 [formError]="formErrors['new-password']" autocomplete="new-password"
18 [ngClass]="{ 'input-error': formErrors['new-password'] }" 14 ></my-input-text>
19 autocomplete="new-password"></my-input-text>
20 <div *ngIf="formErrors['new-password']" class="form-error">
21 {{ formErrors['new-password'] }}
22 </div>
23 15
24 <my-input-text formControlName="new-confirmed-password" 16 <my-input-text
25 inputId="new-confirmed-password" 17 formControlName="new-confirmed-password" inputId="new-confirmed-password" i18n-placeholder placeholder="Confirm new password"
26 i18n-placeholder placeholder="Confirm new password" 18 [formError]="formErrors['new-confirmed-password']" autocomplete="new-password"
27 [ngClass]="{ 'input-error': formErrors['new-confirmed-password'] }" 19 ></my-input-text>
28 autocomplete="new-password"></my-input-text>
29 <div *ngIf="formErrors['new-confirmed-password']" class="form-error">
30 {{ formErrors['new-confirmed-password'] }}
31 </div>
32 20
33 <input type="submit" i18n-value value="Change password" [disabled]="!form.valid"> 21 <input type="submit" i18n-value value="Change password" [disabled]="!form.valid">
34</form> 22</form>