From e5d40a40b5c920dfd529df48c49ca3efd2b0e28e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marl=C3=A8ne=20SIMONDANT?= <msimondant@grandlyon.com>
Date: Thu, 16 Feb 2023 14:05:30 +0000
Subject: [PATCH] fix(structures): structure creation - fix faulty validation
 of PMR page

---
 .../form/form-view/structure-form/structure-form.component.html | 2 ++
 .../components/structure-pmr/structure-pmr.component.html       | 2 +-
 .../shared/components/structure-pmr/structure-pmr.component.ts  | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/app/form/form-view/structure-form/structure-form.component.html b/src/app/form/form-view/structure-form/structure-form.component.html
index 96c718054..feff1ff42 100644
--- a/src/app/form/form-view/structure-form/structure-form.component.html
+++ b/src/app/form/form-view/structure-form/structure-form.component.html
@@ -85,6 +85,8 @@
       [isEditMode]="isEditMode"
       [structureForm]="structureForm"
       (radioChange)="onRadioChange($event)"
+      [isPageValid]="setValidationsForm()"
+      [title]="'La structure est-elle accessible pour les personnes à mobilité réduite ?'"
     ></app-structure-pmr>
   </div>
   <div *ngIf="currentStep === structureFormStep.structureWebAndSocialNetwork">
diff --git a/src/app/shared/components/structure-pmr/structure-pmr.component.html b/src/app/shared/components/structure-pmr/structure-pmr.component.html
index 2212f0be8..3b84e5d70 100644
--- a/src/app/shared/components/structure-pmr/structure-pmr.component.html
+++ b/src/app/shared/components/structure-pmr/structure-pmr.component.html
@@ -8,7 +8,7 @@
       [icon]="'arrowBack'"
     ></app-svg-icon>
     <div class="titleContent">
-      <h3>La structure doit-elle être accessible pour les personnes à mobilité réduite&nbsp;?</h3>
+      <h3>{{ title ? title : 'La structure doit-elle être accessible pour les personnes à mobilité réduite ?' }}</h3>
     </div>
   </div>
   <p class="missing-information" *ngIf="isEditMode && !structureForm.get('pmrAccess').valid">
diff --git a/src/app/shared/components/structure-pmr/structure-pmr.component.ts b/src/app/shared/components/structure-pmr/structure-pmr.component.ts
index c0e0cf366..e9d479615 100644
--- a/src/app/shared/components/structure-pmr/structure-pmr.component.ts
+++ b/src/app/shared/components/structure-pmr/structure-pmr.component.ts
@@ -10,6 +10,7 @@ export class StructurePmrComponent implements OnInit {
   @Input() isEditMode: boolean = false;
   @Input() isPageValid: boolean;
   @Input() nextPage: Function;
+  @Input() title?: string;
   @Output() radioChange = new EventEmitter<any>();
   @Output() validateForm = new EventEmitter<any>();
 
-- 
GitLab