2021-10-21 23:30:25 +02:00
|
|
|
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="resetPasswordTitle">
|
2021-06-02 18:35:49 +02:00
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
|
|
|
|
<div class="modal-header">
|
2022-09-20 13:14:04 +02:00
|
|
|
<h1 class="modal-title" id="resetPasswordTitle">
|
2021-06-02 18:35:49 +02:00
|
|
|
{{ "resetPassword" | i18n }}
|
|
|
|
<small class="text-muted" *ngIf="name">{{ name }}</small>
|
2022-09-20 13:14:04 +02:00
|
|
|
</h1>
|
2021-06-02 18:35:49 +02:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="close"
|
|
|
|
data-dismiss="modal"
|
|
|
|
appA11yTitle="{{ 'close' | i18n }}"
|
|
|
|
>
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<app-callout type="warning"
|
|
|
|
>{{ "resetPasswordLoggedOutWarning" | i18n: loggedOutWarningName }}
|
|
|
|
</app-callout>
|
2021-08-30 23:19:31 +02:00
|
|
|
<app-callout
|
|
|
|
type="info"
|
|
|
|
[enforcedPolicyOptions]="enforcedPolicyOptions"
|
2021-06-02 18:35:49 +02:00
|
|
|
enforcedPolicyMessage="{{ 'resetPasswordMasterPasswordPolicyInEffect' | i18n }}"
|
|
|
|
*ngIf="enforcedPolicyOptions"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2021-06-02 18:35:49 +02:00
|
|
|
</app-callout>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col form-group">
|
|
|
|
<div class="d-flex">
|
|
|
|
<label for="newPassword">{{ "newPassword" | i18n }}</label>
|
|
|
|
<div class="ml-auto d-flex">
|
|
|
|
<a
|
|
|
|
href="#"
|
2022-01-27 18:25:58 +01:00
|
|
|
class="d-block mr-2 bwi-icon-above-input"
|
2021-06-02 18:35:49 +02:00
|
|
|
appStopClick
|
|
|
|
appA11yTitle="{{ 'generatePassword' | i18n }}"
|
|
|
|
(click)="generatePassword()"
|
|
|
|
>
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-lg bwi-fw bwi-refresh" aria-hidden="true"></i>
|
2021-06-02 18:35:49 +02:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="input-group mb-1">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2021-06-02 18:35:49 +02:00
|
|
|
id="newPassword"
|
|
|
|
class="form-control text-monospace"
|
|
|
|
appAutofocus
|
|
|
|
type="{{ showPassword ? 'text' : 'password' }}"
|
|
|
|
name="NewPassword"
|
|
|
|
[(ngModel)]="newPassword"
|
|
|
|
required
|
|
|
|
appInputVerbatim
|
|
|
|
autocomplete="new-password"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2021-06-02 18:35:49 +02:00
|
|
|
<div class="input-group-append">
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-secondary"
|
|
|
|
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
|
|
|
|
(click)="togglePassword()"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi bwi-lg"
|
2021-06-02 18:35:49 +02:00
|
|
|
aria-hidden="true"
|
2022-01-27 18:25:58 +01:00
|
|
|
[ngClass]="{ 'bwi-eye': !showPassword, 'bwi-eye-slash': showPassword }"
|
2021-12-17 15:57:11 +01:00
|
|
|
></i>
|
2021-06-02 18:35:49 +02:00
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
<button
|
2021-06-02 18:35:49 +02:00
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-secondary"
|
|
|
|
appA11yTitle="{{ 'copyPassword' | i18n }}"
|
|
|
|
(click)="copy(newPassword)"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
|
2021-06-02 18:35:49 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-09 19:32:08 +02:00
|
|
|
<app-password-strength
|
|
|
|
[password]="newPassword"
|
|
|
|
[email]="email"
|
|
|
|
[showText]="true"
|
|
|
|
(passwordStrengthResult)="getStrengthResult($event)"
|
|
|
|
>
|
2021-06-02 18:35:49 +02:00
|
|
|
</app-password-strength>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-21 23:30:25 +02:00
|
|
|
<div class="modal-footer">
|
2021-06-02 18:35:49 +02:00
|
|
|
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
2021-06-02 18:35:49 +02:00
|
|
|
<span>{{ "save" | i18n }}</span>
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
|
|
|
{{ "cancel" | i18n }}
|
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2021-06-02 18:35:49 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|