aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/account/account.component.html
blob: ad8f690bd4906e0e20964b0383e2e6af28e88922 (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
<h3>Account</h3>

<div *ngIf="information" class="alert alert-success">{{ information }}</div>
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>

<form role="form" (ngSubmit)="changePassword(newPassword.value, newConfirmedPassword.value)" [ngFormModel]="changePasswordForm">
  <div class="form-group">
    <label for="new-password">New password</label>
    <input
      type="password" class="form-control" name="new-password" id="new-password"
      ngControl="newPassword" #newPassword="ngForm"
    >
    <div [hidden]="newPassword.valid || newPassword.pristine" class="alert alert-warning">
      The password should have more than 5 characters
    </div>
  </div>

  <div class="form-group">
    <label for="name">Confirm new password</label>
    <input
      type="password" class="form-control" name="new-confirmed-password" id="new-confirmed-password"
      ngControl="newConfirmedPassword" #newConfirmedPassword="ngForm"
    >
  </div>

  <input type="submit" value="Change password" class="btn btn-default" [disabled]="!changePasswordForm.valid">
</form>