diff --git a/src/app/features/administration/form/steps/step-one/step-one.component.html b/src/app/features/administration/form/steps/step-one/step-one.component.html index 1e3801db..07bf5c54 100644 --- a/src/app/features/administration/form/steps/step-one/step-one.component.html +++ b/src/app/features/administration/form/steps/step-one/step-one.component.html @@ -18,7 +18,6 @@ (blur)="pollService.updateSlug()" id="title" maxlength="140" - autofocus="autofocus" required /> diff --git a/src/app/features/administration/form/steps/step-one/step-one.component.ts b/src/app/features/administration/form/steps/step-one/step-one.component.ts index 127cfb56..cb450807 100644 --- a/src/app/features/administration/form/steps/step-one/step-one.component.ts +++ b/src/app/features/administration/form/steps/step-one/step-one.component.ts @@ -43,6 +43,11 @@ export class StepOneComponent implements OnInit { if (event) { event.preventDefault(); } + const selector = '#title'; + const firstField = this.document.querySelector(selector); + if (firstField) { + firstField.focus(); + } this.router.navigate(['/']); } } diff --git a/src/app/features/administration/stepper/stepper.component.html b/src/app/features/administration/stepper/stepper.component.html index 9c6b984a..9cad93d2 100644 --- a/src/app/features/administration/stepper/stepper.component.html +++ b/src/app/features/administration/stepper/stepper.component.html @@ -50,6 +50,7 @@ >7 +
@@ -83,7 +84,11 @@
-
@@ -94,28 +99,49 @@ -

Souhaitez-vous vraiment quitter le sondage ? Toutes les informations seront effacées.

- +
-
- +
+

+ {{ 'popup.cancel.title' | translate }} +

-
+
+
+
+ +

+ {{ 'popup.cancel.main' | translate }} +

+ + +
+
+ +
+
+
diff --git a/src/app/features/administration/stepper/stepper.component.scss b/src/app/features/administration/stepper/stepper.component.scss index fb8db730..5c740cfb 100644 --- a/src/app/features/administration/stepper/stepper.component.scss +++ b/src/app/features/administration/stepper/stepper.component.scss @@ -106,7 +106,7 @@ .cancel-button-confirm { display: block !important; width: 100%; - color: white !important; + color: $secondary_color; } } diff --git a/src/assets/i18n/FR.json b/src/assets/i18n/FR.json index 3dc851c3..46ae7122 100644 --- a/src/assets/i18n/FR.json +++ b/src/assets/i18n/FR.json @@ -58,6 +58,12 @@ "description": "et la description serait", "description_placeholder": "description" }, + "popup": { + "cancel" : { + "title": "Vous allez annuler votre sondage", + "main": "Si vous annulez votre sondage vous perdrez toutes les informations saisies jusqu'à maintenant.\nSouhaitez-vous vraiment annuler?" + } + }, "dates": { "title": "Config spécialement pour les dates", "hours_different": "Je souhaite mettre des créneaux horaires",