From 3a676624b9f888d5e8849d715a31da378c3ad387 Mon Sep 17 00:00:00 2001 From: Antonin Coquet <ext.sopra.acoquet@grandlyon.com> Date: Fri, 19 Mar 2021 10:58:28 +0100 Subject: [PATCH] fix: edit reset password page (waiting for official design) --- .../reset-password.component.html | 46 ++++++++++--------- .../reset-password.component.scss | 11 +++++ .../reset-password.component.ts | 1 + 3 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 src/app/reset-password/reset-password.component.scss diff --git a/src/app/reset-password/reset-password.component.html b/src/app/reset-password/reset-password.component.html index 09c0e2aeb..2983fe1f7 100644 --- a/src/app/reset-password/reset-password.component.html +++ b/src/app/reset-password/reset-password.component.html @@ -1,28 +1,30 @@ <div fxLayout="column" class="content-container full-screen"> <div class="section-container" fxLayout="column" fxLayoutAlign="center center"> - <h1>Réinitialisation du mot de passe</h1> - <form *ngIf="!token" [formGroup]="resetForm" (ngSubmit)="onSubmit()"> - <div class="form-group"> - <label for="email">Email</label> - <input - type="email" - autocomplete="on" - formControlName="email" - class="form-control" - [ngClass]="{ 'is-invalid': submitted && f.email.errors }" - /> - <div *ngIf="submitted && f.email.errors" class="invalid-feedback"> - <div *ngIf="f.email.errors.required">Email is required</div> + <div class="resetPasswordForm"> + <h1>Réinitialisation du mot de passe</h1> + <form *ngIf="!token" [formGroup]="resetForm" (ngSubmit)="onSubmit()"> + <div class="form-group"> + <label for="email">Courriel personnel</label> + <div fxLayout="row" fxLayoutGap="13px"> + <input type="text" + autocomplete="on" + formControlName="email" + class="form-input" + [ngClass]="{ 'is-invalid': submitted && f.email.errors }"/> + </div> + <div *ngIf="submitted && f.email.errors" class="invalid-feedback"> + <div *ngIf="f.email.errors.required" >L'adresse e-mail est requise</div> + </div> </div> - </div> - <div class="form-group"> - <button [disabled]="loading" class="btn btn-primary"> - <span *ngIf="loading" class="spinner-border spinner-border-sm mr-1"></span> - Envoyer - </button> - <a routerLink="../login" class="btn btn-link">Cancel</a> - </div> - </form> + <div class="button" fxLayout="row" fxLayoutAlign="space-around center"> + <a routerLink="../login" class="btn btn-link">Annuler</a> + <button [disabled]="loading" class="btn btn-primary"> + <span *ngIf="loading" class="spinner-border spinner-border-sm mr-1"></span> + Envoyer + </button> + </div> + </form> + </div> <form *ngIf="token" [formGroup]="resetFormChangePassword" (ngSubmit)="onSubmitPassword()"> <div class="form-group"> <label for="password">Mot de passe</label> diff --git a/src/app/reset-password/reset-password.component.scss b/src/app/reset-password/reset-password.component.scss new file mode 100644 index 000000000..89432adb7 --- /dev/null +++ b/src/app/reset-password/reset-password.component.scss @@ -0,0 +1,11 @@ +.resetPasswordForm { + max-width: 500px; +} + +.button { + margin-top: 20px; +} + +.form-input { + width: 100%; + } \ No newline at end of file diff --git a/src/app/reset-password/reset-password.component.ts b/src/app/reset-password/reset-password.component.ts index 153f2dc8c..8a0669fd1 100644 --- a/src/app/reset-password/reset-password.component.ts +++ b/src/app/reset-password/reset-password.component.ts @@ -8,6 +8,7 @@ import { CustomRegExp } from '../utils/CustomRegExp'; @Component({ selector: 'app-reset-password', templateUrl: './reset-password.component.html', + styleUrls: ['./reset-password.component.scss'], }) export class ResetPasswordComponent implements OnInit { public resetForm: FormGroup; -- GitLab