2020-01-16 15:35:11 +01:00
|
|
|
<div class="answers" >
|
|
|
|
<h1 i18n >
|
2019-11-23 16:05:44 +01:00
|
|
|
Choisir les propositions
|
2020-01-16 15:35:11 +01:00
|
|
|
</h1 >
|
2019-08-11 10:12:34 +02:00
|
|
|
|
2020-01-16 15:35:11 +01:00
|
|
|
<p
|
|
|
|
class="subtitle"
|
|
|
|
i18n >
|
|
|
|
Vous pouvez utiliser la syntaxe markdown, et naviguer entre les inputs avec les flèches du clavier.
|
|
|
|
</p >
|
2019-08-11 10:12:34 +02:00
|
|
|
|
2020-01-16 15:35:11 +01:00
|
|
|
<ol >
|
|
|
|
<li
|
|
|
|
#answers
|
|
|
|
*ngFor="let answer of config.answers; index as i;trackBy trackFunction"
|
|
|
|
class="answer-item" >
|
|
|
|
<button
|
|
|
|
class='btn btn--default'
|
|
|
|
title='ajouter une image'
|
|
|
|
(click)='showModalForPictureOfAnswer(answer)' >
|
|
|
|
<i class='fa fa-image' ></i >
|
|
|
|
</button >
|
2020-01-20 13:38:57 +01:00
|
|
|
<label
|
|
|
|
for='answer_{{answer.id}}_url'
|
|
|
|
(click)='showModalForPictureOfAnswer(answer)' >
|
|
|
|
|
|
|
|
<img
|
|
|
|
class='img-thumbnail'
|
|
|
|
src='{{answer.url}}'
|
|
|
|
alt='image {{answer.url}}' >
|
|
|
|
</label >
|
|
|
|
<p-dialog
|
|
|
|
class='url-dialog'
|
|
|
|
[(visible)]="display"
|
|
|
|
[modal]='true' >
|
|
|
|
<p-header >
|
|
|
|
{{answer.text}}
|
|
|
|
</p-header >
|
|
|
|
|
|
|
|
<form
|
|
|
|
action='#'
|
|
|
|
(submit)='display=false' >
|
|
|
|
<label for='answer_{{answer.id}}_url' >
|
|
|
|
Choisissez une URL pour illustrer le choix de réponse
|
|
|
|
</label >
|
|
|
|
<i class='fa fa-image' ></i >
|
|
|
|
<br >
|
|
|
|
<input
|
|
|
|
class='input is-block'
|
|
|
|
id='answer_{{answer.id}}_url'
|
|
|
|
type='text'
|
|
|
|
autofocus='autofocus'
|
|
|
|
name='answer-url'
|
|
|
|
[(ngModel)]='answer.url' >
|
|
|
|
|
|
|
|
</form >
|
|
|
|
|
|
|
|
</p-dialog >
|
2019-08-21 14:24:54 +02:00
|
|
|
<input
|
2020-01-15 17:55:22 +01:00
|
|
|
type="name"
|
2019-08-21 14:24:54 +02:00
|
|
|
class="answer"
|
2020-01-16 15:35:11 +01:00
|
|
|
id='answer_{{answer.id}}'
|
2019-09-09 12:21:40 +02:00
|
|
|
[(ngModel)]="answer.text"
|
2019-11-23 16:05:44 +01:00
|
|
|
(keyup.enter)="addAnswer()"
|
|
|
|
(keyup)="navigateOrDelete($event,i)"
|
2020-01-20 15:01:56 +01:00
|
|
|
required='required'
|
2019-08-21 14:24:54 +02:00
|
|
|
placeholder="réponse"
|
|
|
|
>
|
2020-01-16 15:35:11 +01:00
|
|
|
<button
|
|
|
|
class="btn btn--alert"
|
|
|
|
(click)="config.answers.splice(i,1)" >X
|
|
|
|
</button >
|
|
|
|
</li >
|
|
|
|
</ol >
|
2019-08-11 10:12:34 +02:00
|
|
|
|
2019-08-21 14:24:54 +02:00
|
|
|
<button
|
2019-10-16 21:33:49 +02:00
|
|
|
class="btn btn--primary btn--outline"
|
2019-08-21 14:24:54 +02:00
|
|
|
(click)="addAnswer()"
|
2020-01-20 15:01:56 +01:00
|
|
|
[ngClass]="{'btn--primary': allAnswersAreValid}"
|
2019-09-09 12:21:40 +02:00
|
|
|
i18n
|
|
|
|
>
|
2020-01-20 15:01:56 +01:00
|
|
|
<i class='fa fa-plus' ></i >
|
2019-09-09 12:21:40 +02:00
|
|
|
Ajouter une proposition
|
2020-01-16 15:35:11 +01:00
|
|
|
</button >
|
|
|
|
<br >
|
2019-09-09 12:21:40 +02:00
|
|
|
<button
|
|
|
|
[routerLink]="'/step/resume'"
|
2020-01-20 15:01:56 +01:00
|
|
|
class="btn btn--full "
|
2019-09-09 12:21:40 +02:00
|
|
|
i18n
|
2020-01-20 15:01:56 +01:00
|
|
|
[ngClass]="{'btn--primary': allAnswersAreValid}"
|
|
|
|
[disabled]='!allAnswersAreValid'
|
2019-09-09 12:21:40 +02:00
|
|
|
>
|
|
|
|
Voyons ce que ça donne
|
2020-01-16 15:35:11 +01:00
|
|
|
</button >
|
|
|
|
<br >
|
|
|
|
<a
|
2020-01-23 16:47:53 +01:00
|
|
|
[routerLink]="'/home'"
|
2020-01-16 15:35:11 +01:00
|
|
|
class="prev"
|
|
|
|
i18n >
|
2019-09-09 12:21:40 +02:00
|
|
|
Retour
|
2020-01-16 15:35:11 +01:00
|
|
|
</a >
|
|
|
|
</div >
|