You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.8 KiB
HTML
70 lines
1.8 KiB
HTML
<div class="admin-form padded">
|
|
<form [formGroup]="form">
|
|
<header class="columns">
|
|
<div class="column">
|
|
<h1>
|
|
{{ 'creation.title' | translate }}
|
|
</h1>
|
|
</div>
|
|
<div class="column">
|
|
<button
|
|
class="btn is-success"
|
|
(click)="apiService.createPoll(poll)"
|
|
[disabled]="!form.valid || !form.valid"
|
|
>
|
|
<i class="fa fa-save"></i>
|
|
Enregistrer le sondage
|
|
</button>
|
|
</div>
|
|
</header>
|
|
<main class="columns">
|
|
<div class="column">
|
|
<p class="subtitle">
|
|
{{ 'creation.want' | translate }}
|
|
</p>
|
|
|
|
<app-kind-select [form]="form"></app-kind-select>
|
|
<app-base-config [form]="form"></app-base-config>
|
|
<!-- <app-date-select-->
|
|
<!-- *ngIf="form.value.configuration && form.value.configuration.isAboutDate"-->
|
|
<!-- [form]="form"-->
|
|
<!-- ></app-date-select>-->
|
|
<!-- <app-text-select ng-if="!form.value.isAboutDate" [form]="form"></app-text-select>-->
|
|
|
|
<button
|
|
class="btn"
|
|
[class]="{ 'is-primary': advancedDisplayEnabled, 'is-info': !advancedDisplayEnabled }"
|
|
(click)="advancedDisplayEnabled = !advancedDisplayEnabled"
|
|
>
|
|
<i class="fa fa-save"></i>
|
|
{{ 'creation.advanced' | translate }}
|
|
</button>
|
|
<app-advanced-config [poll]="poll" [form]="form" *ngIf="advancedDisplayEnabled"></app-advanced-config>
|
|
</div>
|
|
</main>
|
|
<footer class="column" *ngIf="show_debug_data">
|
|
<h2>Debug data</h2>
|
|
<pre class="debug padded warning">
|
|
form values :
|
|
{{ form.value | json }}
|
|
</pre
|
|
>
|
|
<pre class="debug padded warning">
|
|
poll initial values :
|
|
{{ poll | json }}
|
|
</pre
|
|
>
|
|
</footer>
|
|
<hr />
|
|
<div class="validation">
|
|
<div class="has-background-danger" *ngIf="!form.valid && form.touched">
|
|
le formulaire est invalide
|
|
<pre>
|
|
{{ form.errors | json }}
|
|
</pre
|
|
>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|