diff --git a/src/app/form/form.component.html b/src/app/form/form.component.html index 33562da74da27cfda5e01f465fcd81c16fe9d1ce..6f594df048584c07a7b63d9f5e245f596e0fb770 100644 --- a/src/app/form/form.component.html +++ b/src/app/form/form.component.html @@ -794,11 +794,21 @@ </div> <div *ngIf="currentPage == 14" class="page"> <div class="title"> - <h3>Est-ce accessible pour les personnes à mobilité réduite ?</h3> + <h3>Ces ateliers sont-ils gratuits ?</h3> </div> <app-radio-form - [selectedOption]="getStructureControl('pmrAccess').value" - (selectedEvent)="onPmrAccessChange($event)" + [selectedOption]="getStructureControl('freeWorkShop').value" + (selectedEvent)="onfreeWorkShopChange($event)" + > + </app-radio-form> + </div> + <div *ngIf="currentPage == 15" class="page"> + <div class="title"> + <h3>Proposez-vous le wifi en accès libre ?</h3> + </div> + <app-radio-form + [selectedOption]="getStructureControl('freeWifi').value" + (selectedEvent)="onfreeWifiChange($event)" > </app-radio-form> </div> diff --git a/src/app/form/form.component.ts b/src/app/form/form.component.ts index 86d30e6606fe8e1e219ed1ac74105ad5403c9234..25565d4081b4749dbf2bfededaf78e4f7689848e 100644 --- a/src/app/form/form.component.ts +++ b/src/app/form/form.component.ts @@ -46,7 +46,7 @@ export class FormComponent implements OnInit { public structureId: string; //New var form - public currentPage = 13; + public currentPage = 14; public progressStatus = 0; public nbPagesForm = 20; public accountForm: FormGroup; @@ -187,6 +187,7 @@ export class FormComponent implements OnInit { equipmentsDetails: new FormControl(structure.equipmentsDetails), equipmentsAccessType: this.loadArrayForCheckbox(structure.equipmentsAccessType, false), freeWorkShop: new FormControl(structure.freeWorkShop, Validators.required), + freeWifi: new FormControl(structure.freeWifi, Validators.required), }); this.hoursForm = new FormGroup({ @@ -342,6 +343,7 @@ export class FormComponent implements OnInit { this.getStructureControl('digitalCultureSecurity').valid, }; this.pagesValidation[14] = { valid: this.getStructureControl('freeWorkShop').valid }; + this.pagesValidation[15] = { valid: this.getStructureControl('freeWifi').valid }; this.updatePageValid(); } @@ -428,8 +430,13 @@ export class FormComponent implements OnInit { }); } - public freeWorkShop(bool: boolean): void { + public onfreeWorkShopChange(bool: boolean): void { this.getStructureControl('freeWorkShop').setValue(bool); this.setValidationsForm(); } + + public onfreeWifiChange(bool: boolean): void { + this.getStructureControl('freeWifi').setValue(bool); + this.setValidationsForm(); + } } diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 50bdf3ae24d699ec2829d43adf66b377ebfcd952..53141cc4f526a3e1f00df12a81006b4a5cbabd59 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -44,6 +44,7 @@ export class Structure { public equipmentsDetails: string = null; public equipmentsAccessType: string[] = []; public freeWorkShop: boolean = false; + public freeWifi: boolean = false; public isOpen: boolean = false; public openedOn: OpeningDay = new OpeningDay();