source: extensions/event_cats/admin/template/autolog_new.tpl @ 4116

Last change on this file since 4116 was 4116, checked in by LucMorizur, 15 years ago

[Event Cats] JS bugs removed.

File size: 14.8 KB
Line 
1{* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
2
3{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'}
4
5{* <!-- Whether plugin Additionnal Pages is active or not --> *}
6<div style = "text-align:right; font-style:italic;">
7  {if $ec_ap_ok}
8    {'ec_plugin_ap_ok'|@translate}
9    <script type = "text/javascript"><!--
10      var ec_ap_ok = true; //-->
11    </script>
12  {else}
13    {'ec_plugin_ap_nok'|@translate}
14    <script type = "text/javascript"><!--
15      var ec_ap_ok = false; //-->
16    </script>
17  {/if}
18</div>
19
20{* <!-- Parameters list --> *}
21<form class = "filter" method = "post" name = "ec_new_code" action = "" onsubmit = "return ec_check_submit();">
22  <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
23  <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel" />
24 
25  {* <!-- Page title. Can be "New entry" or "New entry / Entry modification" whether some entries already exist or not --> *}
26  <div style = "text-align:center;">
27    <span style = "font-weight:bold; font-size:120%;">
28      {if $ec_hidden_when_no_code != ''}
29        <a href = "#ec_top" name = "ec_top" title = "{'ec_top_title'|@translate}">
30      {/if}
31      <label for = "ec_page_type_create" {if $ec_hidden_when_no_code == ''} onclick = "ec_mark_type('create_ask');" {/if}>
32        {if $ec_hidden_when_no_code == ''}
33          <input type = "radio" id = "ec_page_type_create" {* onclick = "ec_mark_type('create_ask');" *} {if $ec_is_creation} checked = "checked" {/if} />
34        {/if}
35        <span {if $ec_is_creation and $ec_hidden_when_no_code == ''} style = "text-decoration:underline;" {/if}>{'ec_new_entry_title'|@translate}</span>
36      </label>
37      {if $ec_hidden_when_no_code == ''}
38        <a href = "#ec_top" name = "ec_top" title = "{'ec_top_title'|@translate}">
39         <label style = "font-weight:bold; font-size:120%;">&nbsp;//&nbsp;</label>
40      {/if}
41      </a>
42      <label for = "ec_page_type_modify" onclick = "ec_mark_type('modify_entry_ask');" {$ec_hidden_when_no_code}>
43        <input type = "radio" id = "ec_page_type_modify" {* onclick = "ec_mark_type('modify_entry_ask');" *} {if !$ec_is_creation} checked = "checked" {/if} />
44        <span {if !$ec_is_creation} style = "text-decoration:underline;" {/if}>{'ec_modify_entry_title'|@translate}</span>
45      </label>
46    </span>
47    {if $ec_is_creation}
48      <br><br>
49      <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'ec_new_full_auto'|@translate}"
50       id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/>
51    {/if}
52  </div><br>
53 
54  {* <!-- Table (borders not visible) with 3 rows for parameters adjustment --> *}
55  <table style = "border-spacing:15px" width = "97%">
56   
57    <tr>
58     
59      {* <!-- [ [New / existing code] / [Existing entry] ] selection --> *}
60      <td style = "vertical-align:top; font-weight:bold;">
61        {if $ec_is_creation}
62          {'ec_new_entry'|@translate}
63        {else}
64          {'ec_sel_entry'|@translate}
65        {/if}
66      </td>
67      <td>
68        {if $ec_is_creation}
69          <li>
70            {* <!-- New code (to create) --> *}
71            <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code} >
72              <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_id" value = "new" id = "ec_sel_code_new"/>
73              {'ec_up_code_lbl_code_new'|@translate}
74            </label>
75            <span {$ec_hidden_when_no_code} >&nbsp;</span>
76            <label for = "ec_in_up_code_id" style = "margin:0;">
77              <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'ec_new_entry_button'|@translate}"
78               id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;"
79              />
80            </label>
81            {'ec_gen_code_nb_pre'|@translate}
82            <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;">
83              <option value =  "4" >4{'ec_gen_code_nb_min'|@translate}</option>
84              <option value =  "5" >5</option>
85              <option value =  "8" >8</option>
86              <option value = "10">10</option>
87              <option value = "12">12</option>
88              <option value = "15">15</option>
89              <option value = "16">16</option>
90              <option value = "20">20</option>
91              <option value = "24">24</option>
92              <option value = "25">25</option>
93              <option value = "30">30</option>
94              <option value = "32">32{'ec_gen_code_nb_max'|@translate}</option>
95            </select>
96            {'ec_gen_code_nb_end'|@translate}<br>
97            <ul><li>
98              <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
99               id = "ec_in_up_code_id" onblur = "ec_check_code_text();"
100              />
101            </li></ul>
102          </li>
103         
104          <li>
105            {* <!-- Known code --> *}
106            <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}>
107              <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_list_id" {$ec_hidden_when_no_code} value = "old" id = "ec_sel_code_old" />
108              {'ec_up_code_lbl_code_old'|@translate}
109            </label>
110            <select name = "ec_in_up_code_list" id = "ec_in_up_code_list_id" onchange = "ec_change_code_list(this.value);" {$ec_hidden_when_no_code} >
111              {foreach from=$ec_lists.duplicable_codes.codes key=ec_key item=ec_val}
112                <option value = "{$ec_val.id}">{$ec_key}</option>
113              {/foreach}
114            </select><br>
115          </li>
116         
117        {else}
118         
119          {* <!-- Existing entry selection --> *}
120          <li>
121            {* <!-- Entry choice --> *}
122            <select name = "ec_in_up_entry_list" id = "ec_in_up_entry_list_id" onchange = "ec_mark_entry(this.value);">
123              {foreach from=$ec_lists.ec_table item=ec_val}
124                <option value = "{$ec_val.id}">{$ec_val.id} : {$ec_val.code}</option>
125              {/foreach}
126            </select>
127          </li>
128         
129        {/if}
130      </td>
131    </tr>
132   
133    {* <!-- User to identify --> *}
134    <tr>
135      <td style = "vertical-align:top; font-weight:bold;">{'ec_up_code_lbl_user'|@translate}</td>
136      <td>
137        {if !$ec_is_creation}
138          <li>
139            {* <!-- None --> *}
140            <label onclick = "return ec_mark_user('ec_sel_user_none');">
141              <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none" />
142              {'ec_up_code_lbl_user_none'|@translate}
143            </label><br>
144          </li>
145        {/if}
146       
147        <li>
148          {* <!-- New user (to create) --> *}
149          <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} >
150            <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_txt_id" value = "new" id = "ec_sel_user_new" {$ec_hidden_when_no_user} />
151            {'ec_up_code_lbl_user_new'|@translate}
152          </label>
153          <span {$ec_hidden_when_no_user} >&nbsp;</span>
154          <label for = "ec_in_up_usr_txt_id" style = "margin:0;">
155            <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'ec_up_code_lbl_gen_user'|@translate}"
156             id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
157            />
158          </label><br>
159          <ul><li>
160            <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'ec_new_user_name'|@translate}<br>
161              <input type = "text" name = "ec_in_up_usr_txt" id = "ec_in_up_usr_txt_id" maxlength = "32"
162               size = "20" onblur = "ec_new_user_text = this.value;"
163              />
164            </label>
165            <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'ec_new_user_pswd'|@translate}<br>
166              <input type = "text" name = "ec_in_up_psd_txt" id = "ec_in_up_psd_txt_id" maxlength = "32"
167               size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();"
168              />
169            </label>
170            <label class = "ec_block">&nbsp;<br>
171              <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span>
172            </label>
173           
174          </li></ul><br>
175        </li>
176       
177        <li>
178          {* <!-- Known user --> *}
179          <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} >
180            <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_list_id" {$ec_hidden_when_no_user} value = "old" id = "ec_sel_user_old" />
181            {'ec_up_code_lbl_user_old'|@translate}
182          </label>
183          <select name = "ec_in_up_usr_list" id = "ec_in_up_usr_list_id" onchange = "ec_change_user_list(this.value);" {$ec_hidden_when_no_user} >
184            {foreach from=$ec_lists.user_ids key=ec_key item=ec_val}
185              <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option>
186            {/foreach}
187          </select><br>
188        </li>
189      </td>
190    </tr>
191   
192    {* <!-- Page to display --> *}
193    <tr>
194      <td style = "vertical-align:top;">
195        <span style = "font-weight:bold;">{'ec_up_code_lbl_action'|@translate}</span><br>
196        <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();">
197          <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id">
198          <span id = "ec_style_forced_id">&nbsp;</span>
199        </label>
200      </td>
201      <td>
202       
203        {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
204        <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');"
205         {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if}
206        >
207          <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" />
208          {'ec_up_code_lbl_aps'|@translate}<br>
209          <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
210            {html_options options=$ec_lists.add_pages}
211          </select>
212        </label>
213       
214        {* <!-- Category --> *}
215        <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');">
216          <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id"
217            onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;"
218          />
219          <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'ec_up_code_lbl_cats'|@translate}</span><br>
220          <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;">
221            {html_options options=$ec_lists.categories}
222          </select>
223        </label>
224       
225        {* <!-- Image --> *}
226        <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');">
227          <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" />
228          {'ec_up_code_lbl_img'|@translate}<br>
229          <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6"
230           size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');"
231          /><br>
232          <span id = "ec_in_up_imgs_warn"></span>
233        </label>
234       
235        {* <!-- Index page --> *}
236        <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');">
237          <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" />
238          {'ec_up_code_lbl_home'|@translate}
239        </label>
240       
241        {* <!-- Access denied page (only when modifying an entry) --> *}
242        {if !$ec_is_creation}
243          <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');">
244            <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" />
245            {'ec_up_code_lbl_refused'|@translate}
246          </label>
247        {/if}
248      </td>
249    </tr>
250  </table>
251  <p>
252    <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/>
253    <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();"/>
254  </p>
255</form>
256
257{* <!-- JavaScript functions --> *}
258<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
259<script type = "text/javascript"><!--
260  ec_is_creation                          = {if $ec_is_creation}true{else}false{/if};
261  ec_up_code_lbl_forced_txt               = "{'ec_up_code_lbl_forced'|@translate}";
262  ec_JS_message['ec_gen_user_act_miss']   = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
263  ec_JS_message['ec_act_cat_miss']        = "{'ec_act_cat_miss'|@translate|@escape:javascript}";
264  ec_JS_message['ec_act_img_miss']        = "{'ec_act_img_miss'|@translate|@escape:javascript}";
265  ec_JS_message['ec_new_pwd_gen']         = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";
266  ec_JS_message['ec_act_entry_miss']      = "{'ec_act_entry_miss'|@translate|@escape:javascript}";
267  ec_JS_message['ec_confirm_del_other']   = "{'ec_confirm_del_other'|@translate|@escape:javascript}";
268  ec_JS_message['ec_up_code_lbl_home']    = "{'ec_up_code_lbl_home'|@translate}";
269  ec_JS_message['ec_submit_code_miss']    = "{'ec_submit_code_miss'|@translate}";
270  ec_JS_message['ec_submit_user_miss']    = "{'ec_submit_user_miss'|@translate}";
271  ec_JS_message['ec_submit_action_miss']  = "{'ec_submit_action_miss'|@translate}";
272  ec_JS_message['ec_submit_code_bad']     = "{'ec_submit_code_bad'|@translate}";
273  ec_default_action                       = "{$ec_default_action}";
274  ec_default_entry                        = "{$ec_default_entry}";
275  ec_auto_code_digits_nb                  = "{$ec_def_auto_code_dg_nb}";
276  {if $ec_is_creation}
277    {foreach from=$ec_lists.duplicable_codes.ids key=ec_key item=ec_val}
278      ec_duplic_codes[{$ec_key}] = {$ec_val};
279    {/foreach}
280  {/if}
281  {foreach from=$ec_lists.ec_table item=ec_val}
282    ec_lists['user_id']['{$ec_val.id}'] = "{$ec_val.user_id}";
283    ec_lists['action']['{$ec_val.id}']  = "{$ec_val.action}";
284    ec_lists['arg1']['{$ec_val.id}']    = "{$ec_val.arg1}";
285    ec_lists['arg2']['{$ec_val.id}']    = "{$ec_val.arg2}";
286    ec_lists['forced']['{$ec_val.id}']  = "{$ec_val.forced}";
287  {/foreach}
288  ec_init();
289//--></script>
290
291{include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'}
292
293{* <!--
294--> *}
Note: See TracBrowser for help on using the repository browser.