register.component.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <div class="container navtop">
  2. <div class="row justify-content-center">
  3. <mat-card class="col-11 col-lg-7">
  4. <mat-card-content>
  5. <form [formGroup]="formGroup" (ngSubmit)="signUp()">
  6. <mat-progress-bar class="row " *ngIf="loading" mode="indeterminate"></mat-progress-bar>
  7. <h1 class="row justify-content-center"><b>Inscription</b></h1>
  8. <div class="row justify-content-center ">
  9. <button (click)="signInWithGoogle()" mat-raised-button class="col-10 col-lg-5 mr-lg-2 mb-2 googlelogin" style="background-color: #AD0505; color: white;">
  10. <div class="row mt-1 ml-3">
  11. <mat-icon class="ml-2" svgIcon="googleLogo"></mat-icon>
  12. <p class="ml-2 marginButton">Se connecter avec Google</p>
  13. </div>
  14. </button>
  15. <button mat-raised-button class="col-10 col-lg-5 ml-lg-2 mb-2 facebooklogin" style="background-color: #2121A1; color: white;">
  16. <div class="row mt-1 ml-3">
  17. <mat-icon class="ml-2" svgIcon="facebookLogo"></mat-icon>
  18. <p class="ml-2 marginButton">Se connecter avec Facebook</p>
  19. </div>
  20. </button>
  21. </div>
  22. <div class="row justify-content-center">
  23. <div class="col-4">
  24. <hr>
  25. </div>
  26. <div class="col-1">
  27. <p>ou</p>
  28. </div>
  29. <div class="col-4">
  30. <hr>
  31. </div>
  32. </div>
  33. <div class="row justify-content-center">
  34. <mat-form-field class="col-5">
  35. <input matInput placeholder="Nom :" formControlName="lastname" required>
  36. <mat-error *ngIf="!formGroup.controls['lastname'].valid || formGroup.controls['lastname'].touched">
  37. {{ getErrorLastname() }}
  38. </mat-error>
  39. </mat-form-field>
  40. <mat-form-field class="col-5">
  41. <input matInput placeholder="Prénom :" formControlName="firstname" required>
  42. <mat-error *ngIf="!formGroup.controls['firstname'].valid || formGroup.controls['firstname'].touched">
  43. {{ getErrorFirstname() }}
  44. </mat-error>
  45. </mat-form-field>
  46. </div>
  47. <div class="row justify-content-center">
  48. <mat-form-field class="col-10">
  49. <input matInput placeholder="Numéro de téléphone :" formControlName="phonenumber" required>
  50. <mat-error *ngIf="!formGroup.controls['phonenumber'].valid || formGroup.controls['phonenumber'].touched">
  51. {{ getErrorPhonenumber() }}
  52. </mat-error>
  53. </mat-form-field>
  54. </div>
  55. <div class="row justify-content-center">
  56. <mat-form-field class="col-10">
  57. <mat-label>Date de naissance :</mat-label>
  58. <input matInput [matDatepicker]="picker" disabled="true" [max]="maxDate" formControlName="birthday" (click)="picker.open()" required>
  59. <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
  60. <mat-datepicker touchUi disabled="false" #picker></mat-datepicker>
  61. <mat-error *ngIf="!formGroup.controls['birthday'].valid || formGroup.controls['birthday'].touched">
  62. {{ getErrorDate() }}
  63. </mat-error>
  64. </mat-form-field>
  65. </div>
  66. <div class="row justify-content-center">
  67. <mat-form-field class="col-10">
  68. <input matInput placeholder="Adresse :" formControlName="adress" required>
  69. <mat-error *ngIf="!formGroup.controls['adress'].valid || formGroup.controls['adress'].touched">
  70. {{ getErrorAdress() }}
  71. </mat-error>
  72. </mat-form-field>
  73. </div>
  74. <div class="row justify-content-center">
  75. <mat-form-field class="col-10">
  76. <input matInput placeholder="Adresse email :" formControlName="email" required>
  77. <mat-error *ngIf="!formGroup.controls['email'].valid || formGroup.controls['email'].touched">
  78. {{ getErrorEmail() }}
  79. </mat-error>
  80. </mat-form-field>
  81. </div>
  82. <div class="row justify-content-center">
  83. <mat-form-field class="col-10">
  84. <input matInput placeholder="Mot de passe :" formControlName="password" [type]="hide ?
  85. 'password' : 'text'" required>
  86. <mat-icon matSuffix (click)="hide = !hide">{{hide ? 'visibility_off' :
  87. 'visibility'}}</mat-icon>
  88. <mat-error *ngIf="!formGroup.controls['password'].valid || formGroup.controls['password'].touched">
  89. {{ getErrorPassword() }}
  90. </mat-error>
  91. </mat-form-field>
  92. </div>
  93. <div class="row justify-content-center">
  94. <mat-form-field class="col-10">
  95. <input matInput placeholder="Confirmer le mot de passe :" formControlName="confirmPassword" [type]="hide ?
  96. 'password' : 'text'" required>
  97. <mat-icon matSuffix (click)="hide = !hide">{{hide ? 'visibility_off' :
  98. 'visibility'}}</mat-icon>
  99. <mat-error *ngIf="!formGroup.controls['password'].valid || formGroup.controls['password'].touched">
  100. {{ getErrorConfirmPassword() }}
  101. </mat-error>
  102. </mat-form-field>
  103. </div>
  104. <div class="row justify-content-center">
  105. <span class="stay-signed in checkbox-container">
  106. <label class="terms">
  107. <input type="checkbox" formControlName="terms">
  108. J'ai lu et j'accepte <a href="#" style="color: rgb(0, 81, 168); background-color: rgb(255, 255, 255);"> les conditions générales d'utilisation </a> et j'ai pris connaissance de la <a href="#"style="color: rgb(0, 81, 168); background-color: rgb(255, 255, 255);"> politique de confidentialité.</a>
  109. </label>
  110. <label class="terms">
  111. <mat-error *ngIf="!formGroup.controls['terms'].valid || formGroup.controls['terms'].touched"style="color: rgb(170, 19, 8); background-color: rgb(255, 255, 255);">
  112. {{ getErrorTerms() }}
  113. </mat-error>
  114. </label>
  115. </span>
  116. </div>
  117. <div class="row justify-content-center mt-3">
  118. <button class="col-6 color-theme" mat-raised-button color="primary" type="submit" >S'inscrire</button>
  119. </div>
  120. <p class="row justify-content-center mt-3">Vous avez un compte?<a class="ml-1" routerLink="/login" style="color: rgb(0, 81, 168); background-color: rgb(255, 255, 255);">Se connecter</a></p>
  121. </form>
  122. </mat-card-content>
  123. </mat-card>
  124. </div>
  125. </div>