|
1 | 1 | <div> |
2 | | - <div class="row justify-content-center"> |
3 | | - <div class="col-md-4"> |
4 | | - <h1>Reset password</h1> |
| 2 | + <div class="row justify-content-center"> |
| 3 | + <div class="col-md-4"> |
| 4 | + <h1 class="section-title">Reset password</h1> |
5 | 5 |
|
6 | | - <div class="alert alert-danger" *ngIf="initialized && !key"> |
7 | | - <strong>The password reset key is missing.</strong> |
8 | | - </div> |
9 | | - |
10 | | - <div class="alert alert-warning" *ngIf="key && !success"> |
11 | | - <span>Choose a new password</span> |
12 | | - </div> |
| 6 | + <div class="alert alert-danger" *ngIf="initialized && !key"> |
| 7 | + <strong>The password reset key is missing.</strong> |
| 8 | + </div> |
13 | 9 |
|
14 | | - <div class="alert alert-danger" *ngIf="error"> |
15 | | - <span>Your password couldn't be reset. Remember a password request is only valid for 24 hours.</span> |
16 | | - </div> |
| 10 | + <div class="alert alert-warning" *ngIf="key && !success"> |
| 11 | + <span>Choose a new password</span> |
| 12 | + </div> |
17 | 13 |
|
18 | | - <div class="alert alert-success" *ngIf="success"> |
19 | | - <span><strong>Your password has been reset.</strong> Please </span> |
20 | | - <a class="alert-link" (click)="login()">sign in</a>. |
21 | | - </div> |
| 14 | + <div class="alert alert-danger" *ngIf="error"> |
| 15 | + <span>Your password couldn't be reset. Remember a password request is only valid for 24 hours.</span> |
| 16 | + </div> |
22 | 17 |
|
23 | | - <div class="alert alert-danger" *ngIf="doNotMatch"> |
24 | | - The password and its confirmation do not match! |
25 | | - </div> |
| 18 | + <div class="alert alert-success" *ngIf="success"> |
| 19 | + <span><strong>Your password has been reset.</strong> Please </span> |
| 20 | + <a class="alert-link" (click)="login()">sign in</a>. |
| 21 | + </div> |
26 | 22 |
|
27 | | - <div *ngIf="key && !success"> |
28 | | - <form name="form" role="form" (ngSubmit)="finishReset()" [formGroup]="passwordForm"> |
29 | | - <div class="form-group"> |
30 | | - <label class="form-control-label" for="newPassword">New password</label> |
31 | | - <input type="password" class="form-control" id="newPassword" name="newPassword" |
32 | | - placeholder="New password" |
33 | | - formControlName="newPassword" #newPassword> |
| 23 | + <div class="alert alert-danger" *ngIf="doNotMatch"> |
| 24 | + The password and its confirmation do not match! |
| 25 | + </div> |
34 | 26 |
|
35 | | - <div *ngIf="passwordForm.get('newPassword')!.invalid && (passwordForm.get('newPassword')!.dirty || passwordForm.get('newPassword')!.touched)"> |
36 | | - <small class="form-text text-danger" |
37 | | - *ngIf="passwordForm.get('newPassword')?.errors?.required"> |
38 | | - Your password is required. |
39 | | - </small> |
| 27 | + <div *ngIf="key && !success"> |
| 28 | + <form name="form" role="form" (ngSubmit)="finishReset()" [formGroup]="passwordForm"> |
| 29 | + <div class="mb-3"> |
| 30 | + <label class="form-label" for="newPassword">New password</label> |
| 31 | + <input |
| 32 | + type="password" |
| 33 | + class="form-control" |
| 34 | + id="newPassword" |
| 35 | + name="newPassword" |
| 36 | + placeholder="New password" |
| 37 | + formControlName="newPassword" |
| 38 | + #newPassword |
| 39 | + /> |
40 | 40 |
|
41 | | - <small class="form-text text-danger" |
42 | | - *ngIf="passwordForm.get('newPassword')?.errors?.minlength"> |
43 | | - Your password is required to be at least 4 characters. |
44 | | - </small> |
| 41 | + <div |
| 42 | + *ngIf=" |
| 43 | + passwordForm.get('newPassword')!.invalid && |
| 44 | + (passwordForm.get('newPassword')!.dirty || passwordForm.get('newPassword')!.touched) |
| 45 | + " |
| 46 | + > |
| 47 | + <small class="form-text text-danger" *ngIf="passwordForm.get('newPassword')?.errors?.required"> |
| 48 | + Your password is required. |
| 49 | + </small> |
45 | 50 |
|
46 | | - <small class="form-text text-danger" |
47 | | - *ngIf="passwordForm.get('newPassword')?.errors?.maxlength"> |
48 | | - Your password cannot be longer than 50 characters. |
49 | | - </small> |
50 | | - </div> |
| 51 | + <small class="form-text text-danger" *ngIf="passwordForm.get('newPassword')?.errors?.minlength"> |
| 52 | + Your password is required to be at least 4 characters. |
| 53 | + </small> |
51 | 54 |
|
52 | | - <jhi-password-strength-bar [passwordToCheck]="passwordForm.get('newPassword')!.value"></jhi-password-strength-bar> |
53 | | - </div> |
| 55 | + <small class="form-text text-danger" *ngIf="passwordForm.get('newPassword')?.errors?.maxlength"> |
| 56 | + Your password cannot be longer than 50 characters. |
| 57 | + </small> |
| 58 | + </div> |
54 | 59 |
|
55 | | - <div class="form-group"> |
56 | | - <label class="form-control-label" for="confirmPassword">New password confirmation</label> |
57 | | - <input type="password" class="form-control" id="confirmPassword" name="confirmPassword" |
58 | | - placeholder="Confirm the new password" |
59 | | - formControlName="confirmPassword"> |
| 60 | + <jhi-password-strength-bar [passwordToCheck]="passwordForm.get('newPassword')!.value"></jhi-password-strength-bar> |
| 61 | + </div> |
60 | 62 |
|
61 | | - <div *ngIf="passwordForm.get('confirmPassword')!.invalid && (passwordForm.get('confirmPassword')!.dirty || passwordForm.get('confirmPassword')!.touched)"> |
62 | | - <small class="form-text text-danger" |
63 | | - *ngIf="passwordForm.get('confirmPassword')?.errors?.required"> |
64 | | - Your password confirmation is required. |
65 | | - </small> |
| 63 | + <div class="mb-3"> |
| 64 | + <label class="form-label" for="confirmPassword">New password confirmation</label> |
| 65 | + <input |
| 66 | + type="password" |
| 67 | + class="form-control" |
| 68 | + id="confirmPassword" |
| 69 | + name="confirmPassword" |
| 70 | + placeholder="Confirm the new password" |
| 71 | + formControlName="confirmPassword" |
| 72 | + /> |
66 | 73 |
|
67 | | - <small class="form-text text-danger" |
68 | | - *ngIf="passwordForm.get('confirmPassword')?.errors?.minlength"> |
69 | | - Your password confirmation is required to be at least 4 characters. |
70 | | - </small> |
| 74 | + <div |
| 75 | + *ngIf=" |
| 76 | + passwordForm.get('confirmPassword')!.invalid && |
| 77 | + (passwordForm.get('confirmPassword')!.dirty || passwordForm.get('confirmPassword')!.touched) |
| 78 | + " |
| 79 | + > |
| 80 | + <small class="form-text text-danger" *ngIf="passwordForm.get('confirmPassword')?.errors?.required"> |
| 81 | + Your password confirmation is required. |
| 82 | + </small> |
71 | 83 |
|
72 | | - <small class="form-text text-danger" |
73 | | - *ngIf="passwordForm.get('confirmPassword')?.errors?.maxlength"> |
74 | | - Your password confirmation cannot be longer than 50 characters. |
75 | | - </small> |
76 | | - </div> |
77 | | - </div> |
| 84 | + <small class="form-text text-danger" *ngIf="passwordForm.get('confirmPassword')?.errors?.minlength"> |
| 85 | + Your password confirmation is required to be at least 4 characters. |
| 86 | + </small> |
78 | 87 |
|
79 | | - <button type="submit" [disabled]="passwordForm.invalid" class="btn btn-primary">Reset Password</button> |
80 | | - </form> |
| 88 | + <small class="form-text text-danger" *ngIf="passwordForm.get('confirmPassword')?.errors?.maxlength"> |
| 89 | + Your password confirmation cannot be longer than 50 characters. |
| 90 | + </small> |
81 | 91 | </div> |
82 | | - </div> |
| 92 | + </div> |
| 93 | + |
| 94 | + <button type="submit" [disabled]="passwordForm.invalid" class="btn btn-primary">Reset Password</button> |
| 95 | + </form> |
| 96 | + </div> |
83 | 97 | </div> |
| 98 | + </div> |
84 | 99 | </div> |
0 commit comments