]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html
Handle input error in custom input text
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-settings / my-account-change-email / my-account-change-email.component.html
1 <div *ngIf="error" class="alert alert-danger">{{ error }}</div>
2 <div *ngIf="success" class="alert alert-success">{{ success }}</div>
3
4 <div i18n class="pending-email" *ngIf="user.pendingEmail">
5 <strong>{{ user.pendingEmail }}</strong> is awaiting email verification
6 </div>
7
8 <form role="form" class="change-email" (ngSubmit)="changeEmail()" [formGroup]="form" *ngIf="user.pluginAuth === null">
9
10 <div class="form-group">
11 <label i18n for="new-email">Change your email</label>
12
13 <div i18n class="form-group-description">
14 Your current email is <strong>{{ user.email }}</strong>.
15 It is never shown to the public.
16 </div>
17
18 <input
19 type="email" id="new-email" i18n-placeholder placeholder="New email" class="form-control"
20 formControlName="new-email" [ngClass]="{ 'input-error': formErrors['new-email'] }"
21 >
22 <div *ngIf="formErrors['new-email']" class="form-error">
23 {{ formErrors['new-email'] }}
24 </div>
25 </div>
26
27 <div class="form-group">
28 <my-input-text
29 formControlName="password" id="password" i18n-placeholder placeholder="Current password"
30 [formError]="formErrors['password']" autocomplete="current-password"
31 ></my-input-text>
32 </div>
33
34 <input type="submit" i18n-value value="Change email" [disabled]="!form.valid">
35 </form>