diff --git a/src/app/core/services/poll.service.ts b/src/app/core/services/poll.service.ts index d0ea9a0f..f1788d59 100644 --- a/src/app/core/services/poll.service.ts +++ b/src/app/core/services/poll.service.ts @@ -114,7 +114,7 @@ export class PollService implements Resolve { public createFormGroup() { let minlengthValidation = environment.production ? 12 : 0; let form = this.fb.group({ - title: ['', [Validators.required, Validators.minLength(minlengthValidation)]], + title: ['défault titre', [Validators.required, Validators.minLength(minlengthValidation)]], creatorPseudo: ['', []], created_at: [new Date(), [Validators.required]], creatorEmail: ['', [Validators.required]], 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 bcd133df..837753d4 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 @@ -43,6 +43,7 @@ >
{{ pollService.form.value.description.length }} / 300 caractères maximum @@ -58,12 +59,16 @@ + -
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 08d82bc4..731cc56d 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 @@ -35,10 +35,18 @@ export class StepOneComponent implements OnInit { cancelCreationDialog() { this.confirmationService.confirm({ message: 'Quitter la création de sondage?', - accept: (event: any) => { - event.preventDefault(); - this.router.navigate(['/']); + accept: this.leave, + reject: (event: any) => { + console.log('event', event); }, }); } + + leave(event: any) { + console.log('event', event); + if (event) { + event.preventDefault(); + } + this.router.navigate(['/']); + } } diff --git a/src/app/features/administration/form/steps/step-two/step-two.component.html b/src/app/features/administration/form/steps/step-two/step-two.component.html index d5c44a03..f6d7925e 100644 --- a/src/app/features/administration/form/steps/step-two/step-two.component.html +++ b/src/app/features/administration/form/steps/step-two/step-two.component.html @@ -1,47 +1,54 @@
-
- - -

- {{ 'creation.want' | translate }} -

-
-
-
- -
-
- +
+
+ + +

+ {{ 'creation.want' | translate }} +

+
+
+
+
+ + + +
+
+
+
+ + + +
+
-
-
-
- +
+
+ +
+
+ + +
-
- - -
-
+
diff --git a/src/app/features/administration/form/steps/step-two/step-two.component.scss b/src/app/features/administration/form/steps/step-two/step-two.component.scss index ee0d734b..771aadf2 100644 --- a/src/app/features/administration/form/steps/step-two/step-two.component.scss +++ b/src/app/features/administration/form/steps/step-two/step-two.component.scss @@ -9,9 +9,16 @@ .button { background: $d-grey; border: solid white 1px; + transition: background-color ease 1.5s; &.is-selected { border: solid $primary-color 1px; color: $font_color; } + &:hover { + background: $secondary_color; + border: solid $primary-color 1px; + color: $white; + transition: background-color ease 0.25s; + } } } diff --git a/src/app/features/administration/stepper/stepper.component.html b/src/app/features/administration/stepper/stepper.component.html index 1f9a209a..4cc1a36e 100644 --- a/src/app/features/administration/stepper/stepper.component.html +++ b/src/app/features/administration/stepper/stepper.component.html @@ -51,23 +51,18 @@ >
-

+

{{ 'creation.title' | translate }}

-

- - {{ pollService.form.value.title }} - +

+ {{ pollService.form.value.title }}

Étape {{ step_current }} sur {{ step_max }}

-
@@ -76,7 +71,7 @@
- +

{{ 'creation.dialog' | translate }}

@@ -86,14 +81,14 @@ pButton icon="pi pi-times" [label]="'dialogs.no' | translate" - (click)="cd.reject()" + (click)="stepperConfirm.reject()" >
diff --git a/src/app/features/administration/stepper/stepper.component.scss b/src/app/features/administration/stepper/stepper.component.scss index 17466395..7d9f5a3b 100644 --- a/src/app/features/administration/stepper/stepper.component.scss +++ b/src/app/features/administration/stepper/stepper.component.scss @@ -40,4 +40,9 @@ } } } + + .step-title-poll { + font-size: 0.85rem !important; + color: $d-neutral !important; + } } diff --git a/src/app/features/shared/components/ui/form/errors-list/errors-list.component.html b/src/app/features/shared/components/ui/form/errors-list/errors-list.component.html index fda6b1d6..5efcb51d 100644 --- a/src/app/features/shared/components/ui/form/errors-list/errors-list.component.html +++ b/src/app/features/shared/components/ui/form/errors-list/errors-list.component.html @@ -1,6 +1,9 @@

diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index c9e0cea6..dcd50ee3 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -82,4 +82,6 @@ export const environment = { localStorage: { key: 'FramaSondage', }, + + display_validation_errors: false, }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 6f19fc2a..fa314021 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -41,6 +41,7 @@ export const environment = { localStorage: { key: 'FramaDateFunky', }, + display_validation_errors: false, }; // Included with Angular CLI. diff --git a/src/styles/partials/_forms.scss b/src/styles/partials/_forms.scss index 33b9a998..538c734d 100644 --- a/src/styles/partials/_forms.scss +++ b/src/styles/partials/_forms.scss @@ -57,6 +57,7 @@ input, .textarea, select, .select { + @extend .clickable; border: solid 1px $font_color; } @@ -81,6 +82,23 @@ textarea { } } +// radio input structure + +.button { + label { + margin-bottom: 0; + width: 100%; + display: inline-block; + text-align: left; + } +} +input[type='radio'] { + padding: 1em; + margin-bottom: 0; + color: $primary-color; + width: 2em; +} + li { list-style-type: none; } @@ -303,15 +321,6 @@ mat-checkbox { } } -h2.step-title-poll { - font-size: 0.85rem !important; - color: $d-neutral !important; -} - -h2.step-title-poll { - font-size: 0.85rem !important; - color: $d-neutral !important; -} // resume de la création de sondage .step-resume { .content {