datasurvey/src/main/webapp/app/account/password-reset/finish/password-reset-finish.compo...

172 lines
7.2 KiB
HTML

<div class="account-pages pt-2 pt-sm-5 pb-4 pb-sm-5" style="height: 100vh; background-color: #f1f5f9">
<div class="container">
<div class="row justify-content-center">
<div class="col-xxl-4 col-lg-5">
<div class="card mt-5">
<!-- Logo -->
<div class="pl-4 pt-4 pr-4 pb-1 text-center">
<img src="../../content/img_datasurvey/datasurvey-logo-text-black.svg" alt="" />
</div>
<div class="card-body p-4">
<div class="text-center w-75 m-auto">
<h4
class="text-dark-50 text-center pb-0 fw-bold p-0 m-0"
style="color: #727070; font-weight: 700; font-size: 1.3rem"
jhiTranslate="reset.finish.title"
>
Reset password
</h4>
<p class="mb-4" style="color: rgba(146, 146, 146, 0.664)" *ngIf="key && !success" jhiTranslate="reset.finish.messages.info">
Choose a new password
</p>
</div>
<div>
<div class="alert alert-danger" jhiTranslate="reset.finish.messages.keymissing" *ngIf="initialized && !key">
<strong>The password reset key is missing.</strong>
</div>
<div class="alert alert-danger" *ngIf="error">
<span jhiTranslate="reset.finish.messages.error"
>Your password couldn't be reset. Remember a password request is only valid for 24 hours.</span
>
</div>
<div *ngIf="success">
<div class="alert alert-success text-center my-2">
<span jhiTranslate="reset.finish.messages.success"><strong>Your password has been reset.</strong></span>
</div>
<div class="d-flex justify-content-center">
<button class="ds-btn ds-btn--primary" routerLink="/login" jhiTranslate="global.messages.info.authenticated.botonInicio">
sign in
</button>
</div>
</div>
<div class="alert alert-danger" *ngIf="doNotMatch" jhiTranslate="global.messages.error.dontmatch">
The password and its confirmation do not match!
</div>
</div>
<div *ngIf="key && !success">
<form name="form" class="ds-form" role="form" (ngSubmit)="finishReset()" [formGroup]="passwordForm">
<div class="form-group">
<label class="form-control-label" for="newPassword" jhiTranslate="global.form.newpassword.label">New password</label>
<input
type="password"
class="form-control"
id="newPassword"
name="newPassword"
placeholder="{{ 'global.form.newpassword.placeholder' | translate }}"
formControlName="newPassword"
data-cy="resetPassword"
#newPassword
/>
<div
*ngIf="
passwordForm.get('newPassword')!.invalid &&
(passwordForm.get('newPassword')!.dirty || passwordForm.get('newPassword')!.touched)
"
>
<small
class="form-text text-danger"
*ngIf="passwordForm.get('newPassword')?.errors?.required"
jhiTranslate="global.messages.validate.newpassword.required"
>
Your password is required.
</small>
<small
class="form-text text-danger"
*ngIf="passwordForm.get('newPassword')?.errors?.minlength"
jhiTranslate="global.messages.validate.newpassword.minlength"
>
Your password is required to be at least 8 characters.
</small>
<small
class="form-text text-danger"
*ngIf="passwordForm.get('newPassword')?.errors?.maxlength"
jhiTranslate="global.messages.validate.newpassword.maxlength"
>
Your password cannot be longer than 50 characters.
</small>
</div>
<!--<jhi-password-strength-bar [passwordToCheck]="passwordForm.get('newPassword')!.value"></jhi-password-strength-bar>-->
</div>
<div class="form-group">
<label class="form-control-label" for="confirmPassword" jhiTranslate="global.form.confirmpassword.label"
>New password confirmation</label
>
<input
type="password"
class="form-control"
id="confirmPassword"
name="confirmPassword"
placeholder="{{ 'global.form.confirmpassword.placeholder' | translate }}"
formControlName="confirmPassword"
data-cy="confirmResetPassword"
/>
<div
*ngIf="
passwordForm.get('confirmPassword')!.invalid &&
(passwordForm.get('confirmPassword')!.dirty || passwordForm.get('confirmPassword')!.touched)
"
>
<small
class="form-text text-danger"
*ngIf="passwordForm.get('confirmPassword')?.errors?.required"
jhiTranslate="global.messages.validate.confirmpassword.required"
>
Your password confirmation is required.
</small>
<small
class="form-text text-danger"
*ngIf="passwordForm.get('confirmPassword')?.errors?.minlength"
jhiTranslate="global.messages.validate.confirmpassword.minlength"
>
Your password confirmation is required to be at least 8 characters.
</small>
<small
class="form-text text-danger"
*ngIf="passwordForm.get('confirmPassword')?.errors?.maxlength"
jhiTranslate="global.messages.validate.confirmpassword.maxlength"
>
Your password confirmation cannot be longer than 50 characters.
</small>
</div>
</div>
<div class="row justify-content-center">
<button
type="submit"
[disabled]="passwordForm.invalid"
class="ds-btn ds-btn--primary"
jhiTranslate="reset.finish.form.button"
data-cy="submit"
>
Reset Password
</button>
</div>
</form>
</div>
</div>
<!-- end card-body -->
</div>
<!-- end card -->
<!-- end row -->
</div>
<!-- end col -->
</div>
<!-- end row -->
</div>
<!-- end container -->
</div>
<!-- end page -->