diff --git a/src/app/reset-password/reset-password.component.html b/src/app/reset-password/reset-password.component.html index 09c0e2aebe7bd5367aee84ce15adf9d4556c87c7..2983fe1f7c5194b914c598f37225ac72280788f0 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 0000000000000000000000000000000000000000..89432adb7c7705afea0af6c36c265fc467b90db5 --- /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 153f2dc8c1fb5b591c179a6860eb6b67b5358652..8a0669fd1537a18189274628d6f47591e2787516 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;