1 | <!-- manage poll --> |
---|
2 | |
---|
3 | {literal} |
---|
4 | <script type="text/javascript"> |
---|
5 | |
---|
6 | function enabled_submit() |
---|
7 | { |
---|
8 | var objtitle = document.getElementById('ititle'); |
---|
9 | var objbutton = document.getElementById('isubmit'); |
---|
10 | |
---|
11 | if(objtitle.value.length>0) |
---|
12 | { objbutton.disabled=false; } else { objbutton.disabled=true; } |
---|
13 | } |
---|
14 | |
---|
15 | function change_color(inputzone, colorsquare) |
---|
16 | { |
---|
17 | var objinp = document.getElementById(inputzone); |
---|
18 | var objcol = document.getElementById(colorsquare); |
---|
19 | var colvalue = objinp.value; |
---|
20 | |
---|
21 | while(colvalue.length<6) { colvalue+='0'; } |
---|
22 | |
---|
23 | objcol.style.background = '#'+colvalue; |
---|
24 | } |
---|
25 | |
---|
26 | function change_lang() |
---|
27 | { |
---|
28 | var objdeflang = document.getElementById('ilang'); |
---|
29 | var objslang = document.getElementById('islang'); |
---|
30 | objdeflang.value = objslang.value; |
---|
31 | } |
---|
32 | |
---|
33 | function change_enabled() |
---|
34 | { |
---|
35 | var objenabled = document.getElementById('ienabled'); |
---|
36 | var objsenabled = document.getElementById('isenabled'); |
---|
37 | objenabled.value = objsenabled.value; |
---|
38 | } |
---|
39 | </script> |
---|
40 | {/literal} |
---|
41 | |
---|
42 | <div> |
---|
43 | <div style="text-align:right;margin:0px;margin-right:8px;float:right;{$datas.MYPOLLS_ICN_HIDDEN}"> |
---|
44 | <a href="{$datas.MYPOLLS_LNK_VIEW}" title="{'mypolls_list_lnk_view'|@translate}"> |
---|
45 | <img src="{$themeconf.admin_icon_dir}/category_jump-to.png" class="button" alt="{'mypolls_list_lnk_view'|@translate}"/></a> |
---|
46 | </div> |
---|
47 | <i>{'mypolls_cm_stars_are_needed'|@translate}</i> |
---|
48 | </div> |
---|
49 | |
---|
50 | |
---|
51 | <form method="post" action="" class="general"> |
---|
52 | <fieldset > |
---|
53 | <legend>{'mypolls_cm_nfo'|@translate}</legend> |
---|
54 | <table class="formtable"> |
---|
55 | <tr> |
---|
56 | <td>{'mypolls_att_language'|@translate}</td> |
---|
57 | <td> |
---|
58 | <input type="hidden" name="fmypolls_att_default_lang" id="ilang" value=""> |
---|
59 | <select {$datas.MYPOLLS_LANG_DISABLED} onchange="change_lang();" id="islang"> |
---|
60 | {html_options values=$mypolls_language_list_values output=$mypolls_language_list_labels selected=$mypolls_language_selected } |
---|
61 | </select> |
---|
62 | </td> |
---|
63 | </tr> |
---|
64 | |
---|
65 | <tr> |
---|
66 | <td>{'mypolls_att_title'|@translate}<sup style="color:rgb(255,255,0)">*</sup></td> |
---|
67 | <td> |
---|
68 | <input type="text" name="fmypolls_att_title" id="ititle" |
---|
69 | value="{$datas.MYPOLLS_ATT_TITLE}" maxlength=250 size=80 |
---|
70 | onkeyup="enabled_submit()" |
---|
71 | onblur="enabled_submit()"> |
---|
72 | </td> |
---|
73 | </tr> |
---|
74 | <tr> |
---|
75 | <td>{'mypolls_att_description'|@translate}</td> |
---|
76 | <td><textarea name="fmypolls_att_description" rows=6 cols=80>{$datas.MYPOLLS_ATT_DESCRIPTION}</textarea></td> |
---|
77 | </tr> |
---|
78 | <tr> |
---|
79 | <td>{'mypolls_att_after_vote_text'|@translate}</td> |
---|
80 | <td><textarea name="fmypolls_att_after_vote_text" rows=6 cols=80>{$datas.MYPOLLS_ATT_AFTER_VOTE_TEXT}</textarea></td> |
---|
81 | </tr> |
---|
82 | </table> |
---|
83 | </fieldset> |
---|
84 | |
---|
85 | <fieldset > |
---|
86 | <legend>{'mypolls_cm_settings'|@translate}</legend> |
---|
87 | <table class="formtable"> |
---|
88 | |
---|
89 | <tr> |
---|
90 | <td>{'mypolls_att_allowed_users_default'|@translate}</td> |
---|
91 | <td colspan=2>{$datas.GENERIC_USERS_ACCESS}</td> |
---|
92 | </tr> |
---|
93 | |
---|
94 | <tr> |
---|
95 | <td>{'mypolls_att_allowed_groups_default'|@translate}</td> |
---|
96 | <td colspan=2>{$datas.GENERIC_GROUPS_ACCESS}</td> |
---|
97 | </tr> |
---|
98 | |
---|
99 | <tr> |
---|
100 | <td colspan=3><hr></td> |
---|
101 | </tr> |
---|
102 | |
---|
103 | <tr> |
---|
104 | <td>{'mypolls_att_enabled'|@translate}</td> |
---|
105 | <td colspan=2> |
---|
106 | <input type="hidden" name="fmypolls_att_enabled" value="" id="ienabled"> |
---|
107 | <select {$datas.MYPOLLS_ENABLED} onchange="change_enabled();" id="isenabled"> |
---|
108 | <option value="y" {$datas.MYPOLLS_ATT_ENABLED_YES}>{'mypolls_yes'|@translate}</option> |
---|
109 | <option value="n" {$datas.MYPOLLS_ATT_ENABLED_NO}>{'mypolls_no'|@translate}</option> |
---|
110 | </select></td> |
---|
111 | </tr> |
---|
112 | |
---|
113 | <tr> |
---|
114 | <td>{'mypolls_att_visible'|@translate}</td> |
---|
115 | <td colspan=2><select name="fmypolls_att_visible"> |
---|
116 | <option value="y" {$datas.MYPOLLS_ATT_VISIBLE_YES}>{'mypolls_yes'|@translate}</option> |
---|
117 | <option value="n" {$datas.MYPOLLS_ATT_VISIBLE_NO}>{'mypolls_no'|@translate}</option> |
---|
118 | </select></td> |
---|
119 | </tr> |
---|
120 | |
---|
121 | <tr> |
---|
122 | <td>{'mypolls_att_allow_comment'|@translate}</td> |
---|
123 | <td colspan=2><select name="fmypolls_att_allow_comment"> |
---|
124 | <option value="y" {$datas.MYPOLLS_ATT_ALLOW_COMMENT_YES}>{'mypolls_yes'|@translate}</option> |
---|
125 | <option value="n" {$datas.MYPOLLS_ATT_ALLOW_COMMENT_NO}>{'mypolls_no'|@translate}</option> |
---|
126 | </select></td> |
---|
127 | </tr> |
---|
128 | |
---|
129 | <tr> |
---|
130 | <td>{'mypolls_att_show_user_comment'|@translate}</td> |
---|
131 | <td colspan=2><select name="fmypolls_att_show_comments"> |
---|
132 | <option value="y" {$datas.MYPOLLS_ATT_SHOW_USER_COMMENT_YES}>{'mypolls_yes'|@translate}</option> |
---|
133 | <option value="n" {$datas.MYPOLLS_ATT_SHOW_USER_COMMENT_NO}>{'mypolls_no'|@translate}</option> |
---|
134 | </select></td> |
---|
135 | </tr> |
---|
136 | |
---|
137 | <tr> |
---|
138 | <td>{'mypolls_att_public_results'|@translate}</td> |
---|
139 | <td colspan=2><select name="fmypolls_att_public_results"> |
---|
140 | <option value="y" {$datas.MYPOLLS_ATT_PUBLIC_RESULTS_YES}>{'mypolls_yes'|@translate}</option> |
---|
141 | <option value="n" {$datas.MYPOLLS_ATT_PUBLIC_RESULTS_NO}>{'mypolls_no'|@translate}</option> |
---|
142 | </select></td> |
---|
143 | </tr> |
---|
144 | |
---|
145 | <tr> |
---|
146 | <td colspan=3><hr></td> |
---|
147 | </tr> |
---|
148 | |
---|
149 | <tr> |
---|
150 | <td>{'mypolls_att_display_type'|@translate}</td> |
---|
151 | <td colspan=2> |
---|
152 | <select name="fmypolls_att_display_type"> |
---|
153 | {html_options from=$mypolls_display_rows values=$mypolls_display_list_values output=$mypolls_display_list_labels selected=$mypolls_display_selected } |
---|
154 | </select> |
---|
155 | </td> |
---|
156 | </tr> |
---|
157 | |
---|
158 | <tr> |
---|
159 | <td>{'mypolls_att_color_bars'|@translate}</td> |
---|
160 | <td><input type="text" name="fmypolls_att_color_bars" value="{$datas.fmypolls_att_color_bars}" maxlength=6 id="idz1" onkeyup="change_color('idz1', 'ids1')"/></td> |
---|
161 | <td> |
---|
162 | <div id="ids1" style="left:0px;display:block;width:15px;height:15px;border:0px;background-color:#{$datas.fmypolls_att_color_bars}"/> |
---|
163 | </td> |
---|
164 | </tr> |
---|
165 | |
---|
166 | |
---|
167 | </table> |
---|
168 | </fieldset> |
---|
169 | |
---|
170 | <input type="hidden" name="mypolls_step" id="istep" value="{$datas.MYPOLLS_NEXT_STEP}"> |
---|
171 | <input type="hidden" name="action" value="{$datas.MYPOLLS_ACTION}"> |
---|
172 | |
---|
173 | {if isset($datas.mypolls_en_creation) and $datas.mypolls_en_creation=='yes'} |
---|
174 | <p> |
---|
175 | <input type="submit" name="fmypolls_create_new_poll" id="isubmit" value="{'mypolls_cnp_submit1'|@translate}" > |
---|
176 | </p> |
---|
177 | {/if} |
---|
178 | |
---|
179 | {if isset($datas.mypolls_en_modification) and $datas.mypolls_en_modification=='yes'} |
---|
180 | {literal} |
---|
181 | <script type="text/javascript"> |
---|
182 | function load_page() |
---|
183 | { |
---|
184 | var obj = document.getElementById('iqid'); |
---|
185 | var objstep = document.getElementById('istep'); |
---|
186 | var objsub = document.getElementById('isubmit2'); |
---|
187 | |
---|
188 | objstep.value=obj.value; |
---|
189 | objsub.click(); |
---|
190 | } |
---|
191 | |
---|
192 | function load_trans_page() |
---|
193 | { |
---|
194 | var objstid = document.getElementById('istid'); |
---|
195 | var objtid = document.getElementById('itid'); |
---|
196 | var objsub = document.getElementById('isubmit4'); |
---|
197 | |
---|
198 | if(objstid.options[objstid.selectedIndex].disabled==false) |
---|
199 | { |
---|
200 | objtid.value=objstid.value; |
---|
201 | objsub.click(); |
---|
202 | } |
---|
203 | else |
---|
204 | { |
---|
205 | objstid.selectedIndex=0; |
---|
206 | } |
---|
207 | } |
---|
208 | |
---|
209 | </script> |
---|
210 | {/literal} |
---|
211 | |
---|
212 | <input type="hidden" name="fmypolls_att_id" value="{$datas.ID}"> |
---|
213 | <p> |
---|
214 | <input type="submit" name="fmypolls_modify_poll" id="isubmit" value="{'mypolls_mp_submit'|@translate}" > |
---|
215 | <input type="submit" name="fmypolls_delete_poll" value="{'mypolls_dp_submit'|@translate}" > |
---|
216 | </p> |
---|
217 | <fieldset> |
---|
218 | <legend>{'mypolls_modify_questions'|@translate} [{$datas.NBQUESTIONS}]</legend> |
---|
219 | <table width="100%"> |
---|
220 | <tr> |
---|
221 | <td> |
---|
222 | <label>{'mypolls_modify_a_question'|@translate} |
---|
223 | <select name="fmypolls_att_question_id" id="iqid" onchange="load_page();"> |
---|
224 | <option value="0" disabled selected>[{'mypolls_select_question'|@translate}]</option> |
---|
225 | {html_options values=$mypolls_questions_list_values output=$mypolls_questions_list_labels} |
---|
226 | </select> |
---|
227 | </label> |
---|
228 | <input type="submit" name="fmypolls_gomodify_question" id="isubmit2" style="visibility:hidden;" > |
---|
229 | </td> |
---|
230 | <td> |
---|
231 | <input type="submit" name="fmypolls_goadd_question" id="isubmit3" value="{'mypolls_mp_add_a_question'|@translate}" > |
---|
232 | </td> |
---|
233 | </tr> |
---|
234 | </table> |
---|
235 | </fieldset> |
---|
236 | |
---|
237 | <fieldset> |
---|
238 | <legend>{'mypolls_trans_list'|@translate}</legend> |
---|
239 | <table width="100%"> |
---|
240 | <tr> |
---|
241 | <td> |
---|
242 | <label>{'mypolls_modify_a_translation'|@translate} |
---|
243 | <input type="hidden" name="fmypolls_translation_id" id="itid" value=""> |
---|
244 | <select id="istid" onchange="load_trans_page();"> |
---|
245 | <option value="" disabled selected>[{'mypolls_select_translation'|@translate}]</option> |
---|
246 | {html_options values=$mypolls_translations_list_values output=$mypolls_translations_list_labels} |
---|
247 | </select> |
---|
248 | </label> |
---|
249 | <input type="submit" name="fmypolls_gomodify_translation" id="isubmit4" style="visibility:hidden;" > |
---|
250 | </td> |
---|
251 | <td> |
---|
252 | <input type="submit" name="fmypolls_goadd_translation" id="isubmit5" |
---|
253 | value="{'mypolls_mp_add_a_translation'|@translate}" {$datas.DISABLE_ADD_TRANS}> |
---|
254 | </td> |
---|
255 | </tr> |
---|
256 | </table> |
---|
257 | </fieldset> |
---|
258 | {/if} |
---|
259 | |
---|
260 | </form> |
---|
261 | |
---|
262 | <script type="text/javascript"> |
---|
263 | enabled_submit(); |
---|
264 | change_lang(); |
---|
265 | change_enabled(); |
---|
266 | </script> |
---|