]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
b74107c9c7058fd2465cbf66b34eed019b54cb81
[ceph.git] /
1 <form #frm="ngForm"
2       [formGroup]="userForm"
3       (ngSubmit)="onSubmit()"
4       novalidate>
5   <div class="form-group has-feedback">
6     <div class="input-group">
7       <input class="form-control"
8              type="password"
9              placeholder="Old password..."
10              id="oldpassword"
11              formControlName="oldpassword"
12              autocomplete="off"
13              autofocus>
14       <span class="input-group-append">
15         <button class="btn btn-outline-light btn-password"
16                 cdPasswordButton="oldpassword">
17         </button>
18       </span>
19     </div>
20     <span class="invalid-feedback"
21           *ngIf="userForm.showError('oldpassword', frm, 'required')"
22           i18n>This field is required.</span>
23     <span class="invalid-feedback"
24           *ngIf="userForm.showError('oldpassword', frm, 'notmatch')"
25           i18n>The old and new passwords must be different.</span>
26   </div>
27   <div class="form-group has-feedback">
28     <div class="input-group">
29       <input class="form-control"
30              type="password"
31              placeholder="Password..."
32              id="newpassword"
33              autocomplete="new-password"
34              formControlName="newpassword">
35       <span class="input-group-append">
36         <button type="button"
37                 class="btn btn-outline-light btn-password"
38                 cdPasswordButton="newpassword">
39         </button>
40       </span>
41     </div>
42     <div class="passwordStrengthLevel">
43       <div class="{{ passwordStrengthLevel }}"
44            data-toggle="tooltip"
45            title="{{ passwordStrengthDescription }}">
46       </div>
47     </div>
48     <span class="invalid-feedback"
49           *ngIf="userForm.showError('newpassword', frm, 'required')"
50           i18n>This field is required.</span>
51     <span class="invalid-feedback"
52           *ngIf="userForm.showError('newpassword', frm, 'notmatch')"
53           i18n>The old and new passwords must be different.</span>
54     <span class="invalid-feedback"
55           *ngIf="userForm.showError('newpassword', frm, 'checkPassword')"
56           i18n>Too weak</span>
57   </div>
58   <div class="form-group has-feedback">
59     <div class="input-group">
60       <input class="form-control"
61              type="password"
62              autocomplete="off"
63              placeholder="Confirm new password..."
64              id="confirmnewpassword"
65              formControlName="confirmnewpassword">
66       <span class="input-group-append">
67         <button class="btn btn-outline-light btn-password"
68                 cdPasswordButton="confirmnewpassword">
69         </button>
70       </span>
71     </div>
72     <span class="invalid-feedback"
73           *ngIf="userForm.showError('confirmnewpassword', frm, 'required')"
74           i18n>This field is required.</span>
75     <span class="invalid-feedback"
76           *ngIf="userForm.showError('confirmnewpassword', frm, 'match')"
77           i18n>Password confirmation doesn't match the new password.</span>
78   </div>
79
80   <input type="submit"
81          class="btn btn-secondary btn-block"
82          [disabled]="userForm.invalid"
83          value="Change password"
84          i18n-value>
85 </form>