{literal}
<script id="q_edit_new" type="text/x-jquery-tmpl">
- <div style="clear: both; padding-top: 1em" class="q_edit" id="q_edit[${qid}]">
- <div>
+ <fieldset style="clear: both; padding-top: 1em; background: inherit; color: inherit"
+ class="q_edit" id="q_edit[${qid}]">
+ <legend>
<span class="q_edit_label" style="font-weight: bold">Question ${qid + 1}</span>
+ <input type="text" name="q_edit[${qid}][label]" value="{{if label}}${label}{{/if}}" />
(<a onclick="$(this).removeQuestion()" style="text-decoration: none">
{/literal}{icon name="delete"}{literal} Supprimer
- </a>)
- </div>
- Titre : <input type="text" name="q_edit[${qid}][label]"
- value="{{if label}}${label}{{/if}}" /><br />
- Type de question : <select name="q_edit[${qid}][type]">
- <option value=""></option>
- <option value="text" {{if type}}{{if type == 'text'}}selected="selected"{{/if}}{{/if}}>Texte</option>
- <option value="section"{{if type}}{{if type == 'section'}}selected="selected"{{/if}}{{/if}}>Section</option>
- </select>
+ </a>)<br />
+ Type de question : <select name="q_edit[${qid}][type]">
+ <option value=""></option>
+ <option value="section" {{if type}}{{if type == 'section'}}selected="selected"{{/if}}{{/if}}>
+ Section
+ </option>
+ <option value="text" {{if type}}{{if type == 'text'}}selected="selected"{{/if}}{{/if}}>
+ Champ libre
+ </option>
+ <option value="multiple" {{if type}}{{if type == 'multiple'}}selected="selected"{{/if}}{{/if}}>
+ Question à choix multiples
+ </option>
+ </select>
+ </legend>
<div class="q_edit_form">
{{tmpl "#q_edit_base"}}
</div>
- </div>
+ </fieldset>
</script>
<script id="q_edit_base" type="text/x-jquery-tmpl">
</script>
<script id="q_edit_text" type="text/x-jquery-tmpl">
+ Type de texte :
+ <select name="q_edit[${qid}][subtype]">
+ <option value="monoline" {{if subtype}}{{if subtype == 'monoline'}}selected="selected"{{/if}}{{/if}}>
+ Une seule ligne
+ </option>
+ <option value="multiline" {{if subtype}}{{if subtype == 'multiline'}}selected="selected"{{/if}}{{/if}}>
+ Plusieurs lignes
+ </option>
+ </select>
</script>
<script id="q_edit_section" type="text/x-jquery-tmpl">
- <div id="section_${qid}" style="padding-left: 4ex; border-left: 1px solid white">
- {{if children}}
- {{tmpl(children) "#q_edit_new"}}
- {{/if}}
+ <div>
+ Type de section :
+ <select name="q_edit[${qid}][subtype]">
+ <option value="group" {{if subtype}}{{if subtype == 'group'}}selected="selected"{{/if}}{{/if}}>
+ Groupe de questions
+ </option>
+ <option value="page" {{if subtype}}{{if subtype == 'page'}}selected="selected"{{/if}}{{/if}}>
+ Nouvelle page
+ </option>
+ </select>
+ </div>
+ <div id="q_edit[${qid}][section]">
<div class="add_question">
<a onclick="$(this).addQuestion()" style="text-decoration: none">
{/literal}{icon name="add"}{literal} Ajouter une question
</a>
</div>
+ </div>
+</script>
+
+<script id="q_edit_multiple" type="text/x-jquery-tmpl">
+ <div id="q_edit[${qid}][answers]">
+ <div>
+ Permettre la sélection de plusieurs réponses ?
+ <select name="q_edit[${qid}][subtype]">
+ <option value="checkbox" {{if subtype}}{{if subtype == 'checkbox'}}selected="selected"{{/if}}{{/if}}>
+ Oui
+ </option>
+ <option value="radio" {{if subtype}}{{if subtype == 'radio'}}selected="selected"{{/if}}{{/if}}>
+ Non
+ </option>
+ </select>
+ </div>
+ <div class="add_answer">
+ <a onclick="$(this).multiple_addAnswer()">
+ {/literal}{icon name="add"}{literal} Ajouter une réponse
+ </a>
+ </div>
+ <div>
+ Ajouter une case Autre ?
+ <select name="q_edit[${qid}][allow_other]">
+ <option value="1" {{if $item.allow_other}}selected="selected"{{/if}}>Oui</option>
+ <option value="" {{if !$item.allow_other}}selected="selected"{{/if}}>Non</option>
+ </select>
+ </div>
+ </div>
+</script>
+
+<script id="q_edit_multiple_answer" type="text/x-jquery-tmpl">
<div>
+ <span class="q_edit_answer_box"></span>
+ <input type="text" name="q_edit[${qid}][answers][]" value="${value}" />
+ <a onclick="$(this).multiple_removeAnswer()">{/literal}{icon name="delete"}{literal}</a>
+ </div>
</script>
{/literal}