1 {**************************************************************************}
3 {* Copyright (C) 2003-2011 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
6 {* This program is free software; you can redistribute it and/or modify *}
7 {* it under the terms of the GNU General Public License as published by *}
8 {* the Free Software Foundation; either version 2 of the License, or *}
9 {* (at your option) any later version. *}
11 {* This program is distributed in the hope that it will be useful, *}
12 {* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13 {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14 {* GNU General Public License for more details. *}
16 {* You should have received a copy of the GNU General Public License *}
17 {* along with this program; if not, write to the Free Software *}
18 {* Foundation, Inc., *}
19 {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
21 {**************************************************************************}
24 <script id="q_edit_new" type="text/x-jquery-tmpl">
25 <fieldset style="clear: both; padding-top: 1em; background: inherit; color: inherit"
26 class="q_edit" id="q_edit[${qid}]">
28 <span class="q_edit_label" style="font-weight: bold">Question ${qid + 1}</span>
29 <input type="text" name="q_edit[${qid}][label]" value="{{if label}}${label}{{/if}}" />
30 (<a onclick="$(this).removeQuestion()" style="text-decoration: none">
31 {/literal}{icon name="delete"}{literal} Supprimer
33 Type de question : <select name="q_edit[${qid}][type]">
34 <option value=""></option>
35 <option value="section" {{if type}}{{if type == 'section'}}selected="selected"{{/if}}{{/if}}>
38 <option value="text" {{if type}}{{if type == 'text'}}selected="selected"{{/if}}{{/if}}>
41 <option value="multiple" {{if type}}{{if type == 'multiple'}}selected="selected"{{/if}}{{/if}}>
42 Question à choix multiples
46 <div class="q_edit_form">
47 {{tmpl "#q_edit_base"}}
52 <script id="q_edit_base" type="text/x-jquery-tmpl">
54 {{tmpl "#q_edit_" + type}}
58 <script id="q_edit_text" type="text/x-jquery-tmpl">
60 <select name="q_edit[${qid}][subtype]">
61 <option value="monoline" {{if subtype}}{{if subtype == 'monoline'}}selected="selected"{{/if}}{{/if}}>
64 <option value="multiline" {{if subtype}}{{if subtype == 'multiline'}}selected="selected"{{/if}}{{/if}}>
70 <script id="q_edit_section" type="text/x-jquery-tmpl">
71 <div id="q_edit[${qid}][section]">
72 <div class="add_question">
73 <a onclick="$(this).addQuestion()" style="text-decoration: none">
74 {/literal}{icon name="add"}{literal} Ajouter une question
80 <script id="q_edit_multiple" type="text/x-jquery-tmpl">
81 <div id="q_edit[${qid}][answers]">
83 Permettre la sélection de plusieurs réponses ?
84 <select name="q_edit[${qid}][subtype]">
85 <option value="checkbox">Oui</option>
86 <option value="radio" selected="selected">Non</option>
89 <div class="add_answer">
90 <a onclick="$(this).multiple_addAnswer()">
91 {/literal}{icon name="add"}{literal} Ajouter une réponse
95 Ajouter une case Autre ?
96 <select name="q_edit[${qid}][allow_other]">
97 <option value="1">Oui</option>
98 <option value="" selected="selected">Non</option>
104 <script id="q_edit_multiple_answer" type="text/x-jquery-tmpl">
106 <span class="q_edit_answer_box"></span>
107 <input type="text" name="q_edit[${qid}][answers][]" value="${value}" />
108 <a onclick="$(this).multiple_removeAnswer()">{/literal}{icon name="delete"}{literal}</a>
114 {* vim:set et sw=2 sts=2 ts=8 enc=utf-8: *}