kind selection fix colors, and fix double popup

This commit is contained in:
Tykayn 2021-12-01 17:53:32 +01:00 committed by tykayn
parent 6a9e85d66a
commit 307fd75615
5 changed files with 12 additions and 26 deletions

View File

@ -43,10 +43,12 @@
></textarea>
<div
class="text-info padded"
*ngIf="pollService.form.value.description.length"
[ngClass]="{ 'has-background-warning': pollService.form.value.description.length === 300 }"
>
{{ pollService.form.value.description.length }} / 300 caractères maximum
<span class="counter-current" *ngIf="pollService.form.value.description.length">
{{ pollService.form.value.description.length }} /
</span>
300 caractères maximum
</div>
</div>
</div>
@ -72,13 +74,8 @@
</ng-template>
</p-confirmDialog>
<div class="columns">
<div class="column"></div>
<div class="column">
<button class="button is-warning is-fullwidth" (click)="cancelCreationDialog()">
{{ 'SENTENCES.Cancel' | translate }}
</button>
</div>
<div class="column">
<!-- [disabled]="form.invalid"-->
<button class="button is-primary is-fullwidth" [routerLink]="['/administration/step/2']">
Suivant
</button>

View File

@ -34,16 +34,6 @@ export class StepOneComponent implements OnInit {
}
}
cancelCreationDialog() {
this.confirmationService.confirm({
message: 'Quitter la création de sondage?',
accept: this.leave,
reject: (event: any) => {
console.log('event', event);
},
});
}
leave(event: any) {
console.log('event', event);
if (event) {

View File

@ -12,8 +12,7 @@
<div
class="button input-radio is-fullwidth"
[ngClass]="{
'is-selected has-background-primary has-text-white':
pollService.form.controls.isAboutDate.value
'is-selected': pollService.form.controls.isAboutDate.value
}"
(click)="pollService.form.controls.isAboutDate.setValue(true)"
>
@ -28,8 +27,7 @@
<div
class="button input-radio is-fullwidth"
[ngClass]="{
'is-selected has-background-primary has-text-white': !pollService.form.controls
.isAboutDate.value
'is-selected': !pollService.form.controls.isAboutDate.value
}"
(click)="pollService.form.controls.isAboutDate.setValue(false)"
>

View File

@ -62,7 +62,7 @@
<h3 class="step-counter-text">Étape {{ step_current }} sur {{ step_max }}</h3>
</div>
<div class="column is-narrow has-text-right">
<a class="cancel-button" (click)="cancelDialog()"> Annuler <i class="fa fa-times"></i> </a>
<a class="cancel-button" (click)="showCancelDialog()"> Annuler <i class="fa fa-times"></i> </a>
</div>
</div>
</div>
@ -81,7 +81,7 @@
pButton
icon="pi pi-times"
[label]="'dialogs.no' | translate"
(click)="stepperConfirm.reject()"
(click)="stepperConfirm.close()"
></button>
<button
type="button"
@ -92,5 +92,4 @@
></button>
</ng-template>
</p-confirmDialog>
<a href="#creation_stepper" (click)="cancelDialog()"></a>
</section>

View File

@ -22,9 +22,11 @@ export class StepperComponent {
private router: Router
) {}
cancelDialog() {
showCancelDialog() {
this.confirmationService.confirm({
message: 'Quitter la création de sondage?',
header: "Retour à l' accueil",
reject: () => {},
accept: () => {
this.router.navigate(['/']);
},