Skip to content
Snippets Groups Projects
Commit 398c4577 authored by felivigneau's avatar felivigneau
Browse files

chgmt mineurs

parent 088f1537
No related branches found
No related tags found
2 merge requests!70Test new form,!71Add context sheet for visits, frontend
......@@ -36,8 +36,8 @@ export const regExps: { [key: string]: RegExp } = {
*/
export const errorMessages: { [key: string]: string } = {
fullName: 'Full name must be between 1 and 128 characters',
email: 'Email must be a valid email address (username@domain)',
confirmEmail: 'Email addresses must match',
email: 'La forme de l\'adresse email doit être valide (username@domain)',
confirmEmail: 'Les adresses email doivent être identiques',
password: 'Password must be between 7 and 15 characters, and contain at least one number and special character',
confirmPassword: 'Passwords must match'
confirmPassword: 'Les mots de passe doivent être identiques'
};
\ No newline at end of file
......@@ -2,5 +2,5 @@ export * from './registration.model';
export * from './registration.service';
export * from './personnalData.model';
export * from './personnalData.service';
// export * from './password.matcher';
// export * from './email.matcher';
......@@ -95,8 +95,11 @@
<!-- Email -->
<div formGroupName="emailGroup">
<mat-form-field>
<input matInput placeholder="Email address" type="email" formControlName="email">
<mat-form-field class="full-width">
<input matInput placeholder="Adresse email*" type="email" formControlName="email">
<mat-hint>
Elle te servira d'identifiant de connexion.
</mat-hint>
<mat-error>
{{errors.email}}
</mat-error>
......@@ -104,8 +107,8 @@
<br />
<mat-form-field>
<input matInput placeholder="Confirm email address" type="email" formControlName="confirmEmail"
<mat-form-field class="full-width">
<input matInput placeholder="Confirmer l'adresse email" type="email" formControlName="confirmEmail"
[errorStateMatcher]="confirmValidParentMatcher">
<mat-error>
{{errors.confirmEmail}}
......@@ -113,14 +116,21 @@
</mat-form-field>
</div>
<mat-form-field class="full-width">
<input matInput type="tel" formControlName="phoneNumber" placeholder="Numéro de téléphone" required>
<mat-hint>
Il nous permettra de te contacter en cas de nécessité.
</mat-hint>
</mat-form-field>
<p>
Il ne te reste plus qu'à choisir un mot de passe. :-)
</p>
<!-- Password -->
<div formGroupName="passwordGroup">
<mat-form-field>
<input matInput placeholder="Password" type="password" formControlName="password">
<mat-form-field class="full-width">
<input matInput placeholder="Mot de passe*" type="password" formControlName="password">
<mat-error>
{{errors.password}}
</mat-error>
......@@ -128,8 +138,8 @@
<br />
<mat-form-field>
<input matInput placeholder="Confirm password" type="password" formControlName="confirmPassword"
<mat-form-field class="full-width">
<input matInput placeholder="Confirmer le mot de passe" type="password" formControlName="confirmPassword"
[errorStateMatcher]="confirmValidParentMatcher">
<mat-error>
{{errors.confirmPassword}}
......
......@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { MatSnackBar } from '@angular/material';
import { Observable } from 'rxjs';
// import { Observable } from 'rxjs';
import { tap, mergeMap } from 'rxjs/operators';
import { Registration, RegistrationService, PersonnalData, PersonnalDataService } from '../core';
import { CustomValidators, ConfirmValidParentMatcher, regExps, errorMessages } from '../core/customValidationModule';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment