1 | <!-- manage poll's translations --> |
---|
2 | |
---|
3 | {literal} |
---|
4 | <script type="text/javascript"> |
---|
5 | |
---|
6 | function enabled_submit() |
---|
7 | { |
---|
8 | var objquestion = document.getElementById('ititle'); |
---|
9 | var objbutton = document.getElementById('isubmit1'); |
---|
10 | |
---|
11 | if(objquestion.value.length>0) |
---|
12 | { objbutton.disabled=false; } else { objbutton.disabled=true; } |
---|
13 | } |
---|
14 | |
---|
15 | |
---|
16 | function change_lang() |
---|
17 | { |
---|
18 | var objtolang = document.getElementById('ilangto'); |
---|
19 | var objslang = document.getElementById('islangto'); |
---|
20 | objtolang.value = objslang.value; |
---|
21 | } |
---|
22 | |
---|
23 | function do_translation(input_id) |
---|
24 | { |
---|
25 | var inputid = document.getElementById(input_id); |
---|
26 | |
---|
27 | google_translate(inputid.value,document.getElementById('ilangfrom').value.substr(0,2), document.getElementById('ilangto').value.substr(0,2), inputid, 'value'); |
---|
28 | } |
---|
29 | </script> |
---|
30 | {/literal} |
---|
31 | |
---|
32 | <div> |
---|
33 | <div style="text-align:right;margin:0px;margin-right:8px;float:right;{$datas.MYPOLLS_ICN_HIDDEN}"> |
---|
34 | <a href="{$datas.MYPOLLS_LNK_VIEW}" title="{'mypolls_list_lnk_view'|@translate}"> |
---|
35 | <img src="{$themeconf.admin_icon_dir}/category_jump-to.png" class="button" alt="{'mypolls_list_lnk_view'|@translate}"/></a> |
---|
36 | <a href="{$datas.MYPOLLS_LNK_MODIFY}" title="{'mypolls_list_lnk_modify_parent'|@translate}"> |
---|
37 | <img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'mypolls_list_lnk_modify_parent'|@translate}"/></a> |
---|
38 | </div> |
---|
39 | <i>{'mypolls_cm_stars_are_needed'|@translate}</i> |
---|
40 | </div> |
---|
41 | |
---|
42 | |
---|
43 | <form method="post" action="" class="general" name="ftranslate_form"> |
---|
44 | |
---|
45 | <fieldset> |
---|
46 | <legend>{'mypolls_trans_fromto'|@translate}</legend> |
---|
47 | <table class="formtable"> |
---|
48 | <tr> |
---|
49 | <td> |
---|
50 | <label>{'mypolls_trans_from'|@translate} |
---|
51 | <input type="hidden" name="fmypolls_trans_from" id="ilangfrom" value="{$datas.MYPOLLS_TRANS_FROM}"> |
---|
52 | <select disabled> |
---|
53 | <option selected>{$datas.MYPOLLS_TRANS_FROM_TEXT}</option> |
---|
54 | </select> |
---|
55 | </label> |
---|
56 | </td> |
---|
57 | <td width="20px"> </td> |
---|
58 | |
---|
59 | <td> |
---|
60 | <label>{'mypolls_trans_to'|@translate} |
---|
61 | <input type="hidden" name="fmypolls_trans_to" id="ilangto" value=""> |
---|
62 | <select {$datas.MYPOLLS_LANG_DISABLED} onchange="change_lang();" id="islangto"> |
---|
63 | {html_options values=$mypolls_langto_list_values output=$mypolls_langto_list_labels selected=$mypolls_langto_selected} |
---|
64 | </select> |
---|
65 | </td> |
---|
66 | </tr> |
---|
67 | </table> |
---|
68 | |
---|
69 | </fieldset> |
---|
70 | |
---|
71 | |
---|
72 | <fieldset class="formtable"> |
---|
73 | <legend>{'mypolls_cm_nfo'|@translate}</legend> |
---|
74 | <ul> |
---|
75 | <li>{'mypolls_att_title'|@translate}<sup style="color:rgb(255,255,0)">*</sup> |
---|
76 | <p>{$datas.MYPOLLS_ATT_TITLE} </p> |
---|
77 | <p> |
---|
78 | <input type="text" name="fmypolls_att_tto_title" id="ititle" |
---|
79 | value="{$datas.MYPOLLS_ATT_TTO_TITLE}" maxlength=250 size=80 |
---|
80 | onkeyup="enabled_submit()" |
---|
81 | onblur="enabled_submit()"> |
---|
82 | <input type="button" name="bttranslate" onclick="do_translation('ititle');" value="{'mypolls_auto_translate'|@translate}"> |
---|
83 | </p> |
---|
84 | </li> |
---|
85 | <li>{'mypolls_att_description'|@translate} |
---|
86 | <p>{$datas.MYPOLLS_ATT_DESCRIPTION} </p> |
---|
87 | <p> |
---|
88 | <textarea name="fmypolls_att_tto_description" id="itto_description" rows=6 cols=80>{$datas.MYPOLLS_ATT_TTO_DESCRIPTION} |
---|
89 | </textarea> |
---|
90 | <input type="button" name="bttranslate" onclick="do_translation('itto_description');" value="{'mypolls_auto_translate'|@translate}"> |
---|
91 | </p> |
---|
92 | </li> |
---|
93 | |
---|
94 | <li>{'mypolls_att_after_vote_text'|@translate} |
---|
95 | <p>{$datas.MYPOLLS_ATT_AFTER_VOTE_TEXT} </p> |
---|
96 | <p> |
---|
97 | <textarea name="fmypolls_att_tto_after_vote_text" id="itto_after_vote_text" rows=6 cols=80>{$datas.MYPOLLS_ATT_TTO_AFTER_VOTE_TEXT} |
---|
98 | </textarea> |
---|
99 | <input type="button" name="bttranslate" onclick="do_translation('itto_after_vote_text');" value="{'mypolls_auto_translate'|@translate}"> |
---|
100 | </p> |
---|
101 | </li> |
---|
102 | </ul> |
---|
103 | </fieldset> |
---|
104 | |
---|
105 | |
---|
106 | {if isset($questions) and count($questions)} |
---|
107 | {foreach from=$questions key=name item=question} |
---|
108 | <fieldset class="formtable"> |
---|
109 | <legend>{'mypolls_cm_question'|@translate} #{$question.NUMQUESTION}</legend> |
---|
110 | <ul> |
---|
111 | <li>{'mypolls_cm_question'|@translate} |
---|
112 | <p>{$question.DESCRIPTION} </p> |
---|
113 | <p> |
---|
114 | <textarea name="fmypolls_att_tto_qdescription_{$question.IDQUESTION}" |
---|
115 | id="itto_qdescription_{$question.IDQUESTION}" |
---|
116 | rows=6 cols=80>{$question.TTO_DESCRIPTION} |
---|
117 | </textarea> |
---|
118 | <input type="button" name="bttranslate" onclick="do_translation('itto_qdescription_{$question.IDQUESTION}');" value="{'mypolls_auto_translate'|@translate}"> |
---|
119 | </p> |
---|
120 | </li> |
---|
121 | {foreach from=$question.answers key=name2 item=answer} |
---|
122 | <li>{'mypolls_cm_answer'|@translate} #{$answer.NUMANSWER} |
---|
123 | <p>{$answer.ANSWER} </p> |
---|
124 | <p> |
---|
125 | <input type="text" name="fmypolls_att_tto_adescription_{$answer.IDANSWER}" |
---|
126 | id="itto_adescription_{$answer.IDANSWER}" |
---|
127 | value="{$answer.TTO_ANSWER}" maxlength=250 size=80> |
---|
128 | <input type="button" name="bttranslate" onclick="do_translation('itto_adescription_{$answer.IDANSWER}');" value="{'mypolls_auto_translate'|@translate}"> |
---|
129 | </p> |
---|
130 | </li> |
---|
131 | {/foreach} |
---|
132 | </ul> |
---|
133 | </fieldset> |
---|
134 | {/foreach} |
---|
135 | {/if} |
---|
136 | |
---|
137 | |
---|
138 | <input type="hidden" name="action" value="{$datas.MYPOLLS_ACTION}"> |
---|
139 | <input type="hidden" name="fmypolls_att_id" value="{$datas.MYPOLLS_ATT_ID}"> |
---|
140 | |
---|
141 | {if isset($datas.mypolls_add_translation) and $datas.mypolls_add_translation=='yes'} |
---|
142 | <p> |
---|
143 | <input type="submit" name="fmypolls_add_translation" id="isubmit1" value="{'mypolls_cmt_submit_add'|@translate}" > |
---|
144 | </p> |
---|
145 | {/if} |
---|
146 | |
---|
147 | {if isset($datas.mypolls_modify_translation) and $datas.mypolls_modify_translation=='yes'} |
---|
148 | <p> |
---|
149 | <input type="submit" name="fmypolls_modify_translation" id="isubmit1" value="{'mypolls_cmt_submit_modify'|@translate}" > |
---|
150 | <input type="submit" name="fmypolls_delete_translation" value="{'mypolls_cmt_submit_delete'|@translate}" > |
---|
151 | </p> |
---|
152 | {/if} |
---|
153 | |
---|
154 | |
---|
155 | </form> |
---|
156 | |
---|
157 | <script type="text/javascript"> |
---|
158 | change_lang(); |
---|
159 | </script> |
---|