aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html
blob: d85be846ba76baca3769b160ce1de729ac8ac5cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
<div *ngIf="success" class="alert alert-success">{{ success }}</div>

<div i18n class="pending-email" *ngIf="user.pendingEmail">
  <strong>{{ user.pendingEmail }}</strong> is awaiting email verification
</div>

<form role="form" class="change-email" (ngSubmit)="changeEmail()" [formGroup]="form" *ngIf="user.pluginAuth === null">

  <div class="form-group">
    <label i18n for="new-email">Change your email</label>

    <div i18n class="form-group-description">
      Your current email is <strong>{{ user.email }}</strong>.
      It is never shown to the public.
    </div>

    <input
      type="email" id="new-email" i18n-placeholder placeholder="New email" class="form-control"
      formControlName="new-email" [ngClass]="{ 'input-error': formErrors['new-email'] }"
    >
    <div *ngIf="formErrors['new-email']" class="form-error">
      {{ formErrors['new-email'] }}
    </div>
  </div>

  <div class="form-group">
    <my-input-text
      formControlName="password" id="password" i18n-placeholder placeholder="Current password"
      [formError]="formErrors['password']" autocomplete="current-password"
    ></my-input-text>
  </div>

  <input type="submit" i18n-value value="Change email" [disabled]="!form.valid">
</form>