diff --git a/src/app/signup/student-signup/student-signup.component.html b/src/app/signup/student-signup/student-signup.component.html index d991f7ce7cbed35f3ca8dde3eb6dd5027eddaf3e..933a7104c8b86354061d689a6040c3b9e62371ec 100644 --- a/src/app/signup/student-signup/student-signup.component.html +++ b/src/app/signup/student-signup/student-signup.component.html @@ -52,34 +52,22 @@ adminsitrative, dans le strict respect du cadre spécifié ci-dessus : </p> - <mat-checkbox id="checkboxUtilisation" class="checkbox-field" formControlName="acceptedConditions" required onclick='if (document.getElementById("checkboxUtilisation").classList.contains("mat-checkbox-checked")) { - document.getElementById("boutonChiant").setAttribute("disabled", "true"); - } - else { - document.getElementById("boutonChiant").removeAttribute("disabled"); - }'> + <mat-checkbox id="checkboxUtilisation" class="checkbox-field" formControlName="agree" required> J'accepte cette utilisation </mat-checkbox> - <p class="text-center"> - <a mat-raised-button color="accent" disabled id="boutonChiant" - href="https://docs.google.com/forms/d/e/1FAIpQLScJnkGaDdXWL-sPyHuq58gJivr5xkZ_M5AASRCBHx4a9wR4-Q/viewform?usp=sf_link" - rel="noreferrer" target="_blank"> + <a mat-raised-button color="accent" [disabled]="formGroup.value.agree == false" + href="https://docs.google.com/forms/u/1/d/1mIEy-FVgYvrL0Ntl8YpLKVn0DqpjSl9S_ekjqYo53rI/viewform" + target="_blank"> <mat-icon>launch</mat-icon> Remplir le formulaire </a> </p> - <mat-checkbox class="checkbox-field" formControlName="filledForm" required> J'ai rempli le formulaire </mat-checkbox> - <!-- ici --> - - - <!-- ici --> - <p> Il ne te reste plus qu'à choisir un mot de passe. :-) </p> diff --git a/src/app/signup/student-signup/student-signup.component.ts b/src/app/signup/student-signup/student-signup.component.ts index ac78486756ca5897ca1c0deb38a2dc775ba6052c..95a4b368511d13f469b3de1aac8728dc5454ceb2 100644 --- a/src/app/signup/student-signup/student-signup.component.ts +++ b/src/app/signup/student-signup/student-signup.component.ts @@ -41,9 +41,11 @@ export class StudentSignupComponent implements OnInit { phoneNumber: '', password: '', passwordConfirm: '', + agree: [false, Validators.required], filledForm: false, acceptedConditions: false, - }, { validator: (group) => this.checkPasswords(group)}) + }, { validator: (group) => this.checkPasswords(group)},) + console.log(this.formGroup.value.agree) } private checkPasswords(group: FormGroup): null | any {