2021-11-16 16:16:30 +01:00
|
|
|
<div class="step step-container">
|
2021-11-07 14:52:49 +01:00
|
|
|
<form class="min-height" [formGroup]="pollService.form">
|
|
|
|
<app-stepper [step_current]="1" [step_max]="5"></app-stepper>
|
|
|
|
<section class="poll-title">
|
|
|
|
<h2 class="title is-2">
|
|
|
|
{{ 'creation.choose_title' | translate }}
|
|
|
|
</h2>
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
2021-11-12 12:09:48 +01:00
|
|
|
<div>
|
2021-11-16 11:03:20 +01:00
|
|
|
<label for="title">{{ 'creation.choose_title_label' | translate }}</label>
|
2021-11-12 12:09:48 +01:00
|
|
|
</div>
|
2021-11-07 14:52:49 +01:00
|
|
|
<input
|
2021-11-14 15:48:27 +01:00
|
|
|
class="input is-fullwidth"
|
2021-11-07 14:52:49 +01:00
|
|
|
#title
|
|
|
|
formControlName="title"
|
2021-11-12 12:09:48 +01:00
|
|
|
(keyup)="pollService.updateSlug()"
|
|
|
|
(blur)="pollService.updateSlug()"
|
2021-11-07 14:52:49 +01:00
|
|
|
id="title"
|
2021-11-16 11:03:20 +01:00
|
|
|
maxlength="140"
|
2021-11-07 14:52:49 +01:00
|
|
|
autofocus="autofocus"
|
|
|
|
required
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<div class="poll-description">
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<label for="descr">Description (optionnel)</label>
|
|
|
|
<div class="rich-toolbar" *ngIf="pollService.form.value.richTextMode">
|
|
|
|
richTextMode activé
|
|
|
|
</div>
|
|
|
|
<textarea
|
|
|
|
class="ui-inputtextarea is-fullwidth is-block"
|
|
|
|
#description
|
|
|
|
matInput
|
|
|
|
id="descr"
|
2021-11-16 11:03:20 +01:00
|
|
|
class="is-large is-full input"
|
2021-11-07 14:52:49 +01:00
|
|
|
formControlName="description"
|
|
|
|
required
|
|
|
|
maxlength="300"
|
|
|
|
></textarea>
|
2021-11-14 15:48:27 +01:00
|
|
|
<div
|
|
|
|
class="text-info padded"
|
|
|
|
[ngClass]="{ 'has-background-warning': pollService.form.value.description.length === 300 }"
|
2021-11-07 14:52:49 +01:00
|
|
|
>
|
2021-11-14 15:48:27 +01:00
|
|
|
{{ pollService.form.value.description.length }} / 300 caractères maximum
|
|
|
|
</div>
|
2021-11-07 14:52:49 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2021-11-17 15:06:36 +01:00
|
|
|
<p-confirmDialog #cd [style]="{ width: '50vw' }">
|
|
|
|
<ng-template pTemplate="header">
|
|
|
|
<h3>{{ 'creation.dialog' | translate }}</h3>
|
|
|
|
</ng-template>
|
|
|
|
<ng-template pTemplate="footer">
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
pButton
|
|
|
|
icon="pi pi-times"
|
2021-11-26 13:30:51 +01:00
|
|
|
[value]="'dialogs.no' | translate"
|
2021-11-17 15:06:36 +01:00
|
|
|
(click)="cd.reject()"
|
|
|
|
></button>
|
2021-11-26 13:30:51 +01:00
|
|
|
<button type="button" icon="pi pi-check" [value]="'dialogs.yes' | translate" (click)="cd.accept()"></button>
|
2021-11-17 15:06:36 +01:00
|
|
|
</ng-template>
|
|
|
|
</p-confirmDialog>
|
2021-11-07 14:52:49 +01:00
|
|
|
<div class="columns">
|
2021-11-16 11:03:20 +01:00
|
|
|
<div class="column">
|
2021-11-26 13:30:51 +01:00
|
|
|
<button class="button is-warning is-fullwidth" (click)="cancelCreationDialog()">
|
2021-11-17 15:06:36 +01:00
|
|
|
{{ 'SENTENCES.Cancel' | translate }}
|
2021-11-16 11:03:20 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
2021-11-07 14:52:49 +01:00
|
|
|
<div class="column">
|
|
|
|
<!-- [disabled]="form.invalid"-->
|
|
|
|
<button class="button is-primary is-fullwidth" [routerLink]="['/administration/step/2']">
|
2021-11-16 11:03:20 +01:00
|
|
|
Suivant
|
2021-11-07 14:52:49 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|