|
|
|
@ -2,9 +2,7 @@
|
|
|
|
|
<h1> |
|
|
|
|
{{ 'creation.title' | translate }} |
|
|
|
|
</h1> |
|
|
|
|
<span class="pre-selector"> |
|
|
|
|
{{ 'creation.want' | translate }} |
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
<button class="btn btn--warning" (click)="askInitFormDefault()"> |
|
|
|
|
<i class="fa fa-refresh"></i> |
|
|
|
|
Tout réinitialiser |
|
|
|
@ -12,37 +10,38 @@
|
|
|
|
|
|
|
|
|
|
<form [formGroup]="form"> |
|
|
|
|
<div class="form-field"> |
|
|
|
|
<h2>Choix de réponse</h2> |
|
|
|
|
<span formArrayName="choices"> |
|
|
|
|
<h3>Choix proposés</h3> |
|
|
|
|
<button (click)="addChoice()"> |
|
|
|
|
<i class="fa fa-plus"></i> |
|
|
|
|
Ajouter un choix |
|
|
|
|
<span class="pre-selector"> |
|
|
|
|
{{ 'creation.want' | translate }} |
|
|
|
|
</span> |
|
|
|
|
<div class="kind-of-poll"> |
|
|
|
|
<h1 class="title is-1"> |
|
|
|
|
<i class="fa fa-calendar" aria-hidden="true"></i> {{ 'dates.title' | translate }} |
|
|
|
|
</h1> |
|
|
|
|
<button |
|
|
|
|
class="btn" |
|
|
|
|
[ngClass]="{ 'is-primary': form.controls.isAboutDate.value }" |
|
|
|
|
(click)="form.controls.isAboutDate.setValue(true)" |
|
|
|
|
> |
|
|
|
|
<i class="fa fa-calendar"></i> |
|
|
|
|
{{ 'creation.kind.date' | translate }} |
|
|
|
|
</button> |
|
|
|
|
<button (click)="reinitChoices()"> |
|
|
|
|
<i class="fa fa-recycle"></i> |
|
|
|
|
Réinitialiser |
|
|
|
|
<button |
|
|
|
|
[ngClass]="{ 'is-primary': !form.controls.isAboutDate.value }" |
|
|
|
|
(click)="form.controls.isAboutDate.setValue(false)" |
|
|
|
|
> |
|
|
|
|
<i class="fa fa-doc-text"></i> |
|
|
|
|
{{ 'creation.kind.classic' | translate }} |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div *ngFor="let choice of choices.controls; let i = index"> |
|
|
|
|
<div class="form-row" [formGroup]="choice"> |
|
|
|
|
<label for="label" class="hidden">label</label> |
|
|
|
|
<input formControlName="label" id="label" placeholder="Enter a choice description" /> |
|
|
|
|
<label for="imageUrl" class="imageUrl">image Url</label> |
|
|
|
|
<input formControlName="imageUrl" id="imageUrl" placeholder="URL de l' image" /> |
|
|
|
|
<button (click)="deleteChoiceField(i)"> |
|
|
|
|
<i class="fa fa-times"></i> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<span> |
|
|
|
|
{{ 'creation.choose_title' | translate }} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="form-field"> |
|
|
|
|
<label class="hidden" for="title">Titre</label> |
|
|
|
|
<input |
|
|
|
|
#title |
|
|
|
|
matInput |
|
|
|
|
placeholder="Votre titre de sondage" |
|
|
|
|
[placeholder]="'creation.choose_title_placeholder' | translate" |
|
|
|
|
formControlName="title" |
|
|
|
|
id="title" |
|
|
|
|
autofocus="autofocus" |
|
|
|
@ -60,6 +59,47 @@
|
|
|
|
|
<i class="fa fa-close"></i> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="form-field"> |
|
|
|
|
<h2>Choix de réponse</h2> |
|
|
|
|
<span> |
|
|
|
|
<span class="columns"> |
|
|
|
|
<span class="column"> |
|
|
|
|
<button class="btn is-primary" (click)="addChoice()"> |
|
|
|
|
<i class="fa fa-plus"></i> |
|
|
|
|
Ajouter un choix |
|
|
|
|
</button> |
|
|
|
|
</span> |
|
|
|
|
<span class="column pull-right"> |
|
|
|
|
<button class="btn is-warning" (click)="reinitChoices()"> |
|
|
|
|
<i class="fa fa-recycle"></i> |
|
|
|
|
Réinitialiser |
|
|
|
|
</button> |
|
|
|
|
</span> |
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
<span *ngFor="let choice of choices.controls; let i = index"> |
|
|
|
|
<div class="form-row" [formGroup]="choice"> |
|
|
|
|
<div class="columns"> |
|
|
|
|
<div class="column">{{ i * 1 + 1 }})</div> |
|
|
|
|
<div class="column"> |
|
|
|
|
<label for="label" class="hidden">label</label> |
|
|
|
|
<input formControlName="label" id="label" placeholder="Enter a choice description" /> |
|
|
|
|
<br /> |
|
|
|
|
<label for="imageUrl" class="imageUrl">image Url</label> |
|
|
|
|
<input formControlName="imageUrl" id="imageUrl" placeholder="URL de l' image" /> |
|
|
|
|
</div> |
|
|
|
|
<div class="column"> |
|
|
|
|
<button class="btn btn-warning" (click)="deleteChoiceField(i)"> |
|
|
|
|
<i class="fa fa-times"></i> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</span> |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<label class="hidden" for="creatorEmail">creator email</label> |
|
|
|
|
<input |
|
|
|
@ -129,23 +169,6 @@
|
|
|
|
|
</span> |
|
|
|
|
<input #slug matInput id="slug" placeholder="Url" formControlName="slug" required /> |
|
|
|
|
<br /> |
|
|
|
|
<h2> |
|
|
|
|
Type de sondage |
|
|
|
|
</h2> |
|
|
|
|
<h1 class="title is-1"><i class="fa fa-calendar" aria-hidden="true"></i> {{ 'dates.title' | translate }}</h1> |
|
|
|
|
<button class="btn" (click)="form.setValue({ isAboutDate: true })"> |
|
|
|
|
Spécial date |
|
|
|
|
</button> |
|
|
|
|
<button class="btn" (click)="form.controls.isAboutDate.setValue(false)"> |
|
|
|
|
Classique - textes |
|
|
|
|
</button> |
|
|
|
|
<button |
|
|
|
|
[ngClass]="{ 'is-primary': !form.controls.isAboutDate.value }" |
|
|
|
|
(click)="form.controls.isAboutDate.setValue(false)" |
|
|
|
|
> |
|
|
|
|
Classique - textes |
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
<h2>Version complète du formulaire</h2> |
|
|
|
|
<div appearance="outline" class="is-flex"> |
|
|
|
|
<mat-label>Nombre de jours avant expiration</mat-label> |
|
|
|
@ -188,12 +211,22 @@
|
|
|
|
|
La réponse « peut-être » sera disponible |
|
|
|
|
</mat-checkbox> |
|
|
|
|
|
|
|
|
|
<button mat-button (click)="createPoll()" [disabled]="!form.valid || !form.valid"> |
|
|
|
|
<button class="btn is-info" (click)="advancedDisplayEnabled = !advancedDisplayEnabled"> |
|
|
|
|
<i class="fa fa-save"></i> |
|
|
|
|
Enregistrer le sondage |
|
|
|
|
Options avancées |
|
|
|
|
</button> |
|
|
|
|
<span class="complete well" *ngIf="longFormVersionEnabled"> |
|
|
|
|
version longue du formulaire activée |
|
|
|
|
</span> |
|
|
|
|
<div class="columns"> |
|
|
|
|
<div class="column"> |
|
|
|
|
<span class="complete well" *ngIf="advancedDisplayEnabled"> |
|
|
|
|
version longue du formulaire activée |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="column"> |
|
|
|
|
<button class="btn is-success" (click)="createPoll()" [disabled]="!form.valid || !form.valid"> |
|
|
|
|
<i class="fa fa-save"></i> |
|
|
|
|
Enregistrer le sondage |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</form> |
|
|
|
|
</div> |
|
|
|
|