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

Last change on this file since 7285 was 7285, checked in by LucMorizur, 14 years ago

Cleaning of autolog_new.tpl thanks to HTMLvalidator (remains quite such cleaning to do...)

File size: 21.4 KB
Line 
1{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
2
3{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
4
5{include file = $HeaderIncTPL}
6{include file = 'include/datepicker.inc.tpl'}
7
8{html_head}
9  <style type="text/css">
10    #ui-datepicker-div {ldelim}
11      display:none;
12    }
13  </style>
14{/html_head}
15
16{* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *}
17<div style = "text-align:right; font-style:italic;">
18  <span id = "ec_help_banner2">
19    {'Help banner'|@translate}&nbsp;
20    <label for = "ec_help_banner2_1" onclick = "ec_mark_help('ec_help_banner_1');">
21      <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_1"/>
22      {'Show'|@translate}
23    </label>
24    &nbsp;
25    <label for = "ec_help_banner2_0" onclick = "ec_mark_help('ec_help_banner_0');">
26      <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_0"/>
27      {'Hide'|@translate}
28    </label>
29    &nbsp;—&nbsp;
30  </span>
31  {if $ec_ap_ok}
32    {'Additional Pages active'|@translate}
33    <script type = "text/javascript">
34      var ec_ap_ok = {if count($ec_lists.add_pages)  ==  0}false{else}true{/if};
35    </script>
36  {else}
37    {'Additional Pages inactive'|@translate}
38    <script type = "text/javascript">
39      var ec_ap_ok = false;
40    </script>
41  {/if}
42</div><span id = "ec_help_ban"></span>
43<script type = "text/javascript"><!--
44  document.getElementById('ec_help_banner2').style.display = "none";
45//--></script>
46
47{* <!-- Parameters list --> *}
48<form class = "filter" method = "post" name = "ec_new_code" action = "" onsubmit = "return ec_check_submit();">
49  <p>
50    <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
51    <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel" />
52  </p>
53 
54  {* <!-- Page title. Can be "New entry" or "Entry modification" --> *}
55  <div style = "text-align:center;">
56    <a style = "font-weight:bold; font-size:120%;" href = "#ec_top" name = "ec_top" title = "{'Place title on top ttip'|@translate}">
57      <!--[if !IE]> <--> <label> <!--> <![endif]-->
58        {if $ec_is_creation}
59          {'New entry title'|@translate}
60        {else}
61          {'Modify entry title'|@translate}
62        {/if}
63      <!--[if !IE]> <--> </label> <!--> <![endif]-->
64      <!-- What we're able to do for our "prefered" browser |-( ...!  -->
65    </a>
66    {if $ec_is_creation}
67      <br /><br />
68      <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'Full auto'|@translate}"
69       id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/>
70    {/if}
71  </div>
72 
73  {* <!-- [ [New / existing code] / [Existing entry] ] selection --> *}
74  <fieldset>
75    <legend style = "font-weight:bold;">
76      {if $ec_is_creation}
77        {'Code'|@translate}
78      {else}
79        {'Selected entry'|@translate}
80      {/if}
81    </legend>
82   
83    <ul>
84      {if $ec_is_creation}
85        <li>
86          {* <!-- New code (to create) --> *}
87          <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code} >
88            <input type = "radio" name = "ec_sel_code" value = "new" id = "ec_sel_code_new"/>
89            {'New code'|@translate}
90          </label>
91          <span {$ec_hidden_when_no_code} >&nbsp;</span>
92          <label for = "ec_in_up_code_id" style = "margin:0;">
93            <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'Auto code button'|@translate}"
94             id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;"
95            />
96          </label>
97          {'Auto code mid'|@translate}
98          <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;">
99            {foreach from = $ec_auto_code_dg_nb item = ec_item name = listloop}
100              <option value = "{$ec_item}">
101                {$ec_item}
102                {if $smarty.foreach.listloop.index  ==  0}
103                  {'Auto code min'|@translate}
104                {/if}
105                {if $smarty.foreach.listloop.index  ==  count($ec_auto_code_dg_nb) - 1}
106                  {'Auto code max'|@translate}
107                {/if}
108              </option>
109            {/foreach}
110          </select>
111          {'Auto code end'|@translate}<br />
112        </li>
113        <li style = "padding-left: 30px;">
114          <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
115           id = "ec_in_up_code_id" onblur = "ec_check_code_text(this.value);"
116          />
117          &nbsp;—&nbsp;
118          <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}">
119            <span style = "font-weight:bold; font-style:italic;">{'Comment'|@translate}</span>
120            <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
121              onchange = "ec_new_comment_text = this.value;"
122            />
123          </label>
124        </li>
125       
126        <li>
127          {* <!-- Known code --> *}
128          <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}>
129            <input type = "radio" name = "ec_sel_code" {$ec_hidden_when_no_code} value = "old" id = "ec_sel_code_old" />
130            {'Existing code'|@translate}
131          </label>
132          <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} >
133            {foreach from = $ec_lists.duplicable_codes.codes key = ec_key item = ec_val}
134              <option value = "{$ec_val.id}">
135                {$ec_key}
136                {if $ec_val.comment != ''}
137                  &nbsp;—&nbsp;{$ec_val.comment}
138                {/if}
139              </option>
140            {/foreach}
141          </select>
142        </li>
143       
144      {else}
145       
146        {* <!-- Existing entry selection --> *}
147        <li>
148          {* <!-- Entry choice --> *}
149          <select name = "ec_in_up_entry_list" id = "ec_in_up_entry_list_id" onchange = "ec_mark_entry(this.value);">
150            {foreach from = $ec_lists.ec_table item = ec_val}
151              <option value = "{$ec_val.id}">
152                {$ec_val.id} : {$ec_val.code}
153                {if $ec_val.comment != ''}
154                  &nbsp;—&nbsp;{$ec_val.comment}
155                {/if}
156              </option>
157            {/foreach}
158          </select>
159          &nbsp;—&nbsp;
160            <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}">
161              <span style = "font-weight:bold;  font-style:italic;">{'Comment'|@translate}</span>
162              <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
163                onchange = "ec_new_comment_text = this.value;"
164              />
165            </label>
166        </li>
167       
168      {/if}
169    </ul>
170   
171  </fieldset>
172 
173  {* <!-- User to identify --> *}
174  <fieldset>
175    <legend style = "font-weight:bold;">
176      {'Identified user'|@translate}
177      <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span><br />
178    </legend>
179     
180      <ul>
181        {if !$ec_is_creation}
182          <li>
183            {* <!-- None --> *}
184            <label onclick = "return ec_mark_user('ec_sel_user_none');">
185              <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none" />
186              {'No user'|@translate}
187            </label><br />
188          </li>
189        {/if}
190       
191        <li>
192          {* <!-- New user (to create) --> *}
193          <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} >
194            <input type = "radio" name = "ec_sel_user" value = "new" id = "ec_sel_user_new" {$ec_hidden_when_no_user} />
195            {'New generic user'|@translate}
196          </label>
197          <span {$ec_hidden_when_no_user} >&nbsp;</span>
198          <label for = "ec_in_up_usr_txt_id" style = "margin:0;">
199            <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'Generate username'|@translate}"
200             id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
201            />
202          </label>
203        </li>
204        <li style = "padding-left: 30px;">
205          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br />
206            <input type = "text" name = "login" id = "ec_in_up_usr_txt_id" maxlength = "50"
207             size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();"
208            />
209          </label>
210          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br />
211            <input type = "text" name = "password" id = "ec_in_up_psd_txt_id" maxlength = "32"
212             size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();"
213            />
214          </label>
215          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br />
216            <input type = "password" id = "ec_confirm_psd_txt_id" maxlength = "32" size = "20"/>
217          </label>
218          <label class = "ec_block" onclick = "ec_check_grp_text(); return ec_mark_user('ec_sel_user_new');" for = "ec_in_up_grp_txt_id">
219            <input type = "checkbox" name = "ec_in_up_newgroup" id = "ec_in_up_newgroup_id"
220             onchange = "ec_selected_old_group = (this.checked != '');"
221            />
222            <span onMouseover = "ec_chk_over_grp = true;" onMouseout = "ec_chk_over_grp = false;">
223              {'New group'|@translate}
224            </span><br />
225            <input type = "text" name = "groupname" id = "ec_in_up_grp_txt_id" maxlength = "32"
226             size = "20" onblur = "ec_new_grp_text = this.value; if (this.value != '') ec_selected_old_group = true;"
227            />
228          </label><br />
229        </li>
230       
231        <li>
232          {* <!-- Known user --> *}
233          <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} >
234            <input type = "radio" name = "ec_sel_user" {$ec_hidden_when_no_user} value = "old" id = "ec_sel_user_old" />
235            {'Existing user'|@translate}
236          </label>
237          <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} >
238            {foreach from = $ec_lists.user_ids key = ec_key item = ec_val}
239              <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option>
240            {/foreach}
241          </select><br />
242        </li>
243      </ul>
244   
245  </fieldset>
246 
247  {* <!-- Page to display --> *}
248  <fieldset style = "float:left;">
249    <legend style = "font-weight:bold;">{'Displayed page'|@translate}</legend>
250   
251    <ul>
252      <li>
253        <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();">
254          <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id">
255          <span id = "ec_style_forced_id">&nbsp;</span>
256        </label>
257      </li>
258     
259      <li>
260        {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
261        <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');"
262         {if !$ec_ap_ok or count($ec_lists.add_pages)  ==  0} style = "display:none;" {/if}
263        >
264          <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" />
265          {'Additional Page'|@translate}<br />
266          <select class = "categoryList" name = "ec_in_up_aps" size = "30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
267            {html_options options = $ec_lists.add_pages}
268          </select>
269        </label>
270       
271        {* <!-- Category, provided at least one category is available --> *}
272        <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');"
273         {if count($ec_lists.categories)  ==  0} style = "display:none;" {/if}
274        >
275          <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat"
276            onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;"
277          />
278          <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'Category'|@translate}</span><br />
279          <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;">
280            {html_options options = $ec_lists.categories}
281          </select>
282        </label>
283       
284        {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *}
285        <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');"
286         {if $ec_no_assoc or count($ec_lists.categories)  ==  0} style = "display:none;" {/if}
287        >
288          <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" />
289          {'Image id'|@translate}<br />
290          <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6"
291           size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');"
292          /><br />
293          <span id = "ec_in_up_imgs_warn">&nbsp;</span><br />
294        </label>
295       
296        {* <!-- Index page --> *}
297        <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');">
298          <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" />
299          {'Home'|@translate}
300        </label>
301       
302        {* <!-- Access denied page (only when modifying an entry) --> *}
303        {if !$ec_is_creation}
304          <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');">
305            <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" />
306            {'Access denied'|@translate}
307          </label>
308        {/if}
309      </li>
310    </ul>
311   
312  </fieldset>
313 
314  <fieldset style = "float:right;">
315    <legend style = "font-weight:bold;">Validité</legend>
316    Date de validité&nbsp;: <br />
317    <label for = "ec_valid_date_on_off_id">
318      <input type = "checkbox" name = "ec_valid_date_on_off" id = "ec_valid_date_on_off_id">
319      Activer
320    </label><br /><br />
321    <select id = "date_creation_day" name = "date_creation_day">
322      <option value = "0">--</option>
323      <option value = "1" >1</option>
324      <option value = "2" >2</option>
325      <option value = "3" >3</option>
326      <option value = "4" >4</option>
327      <option value = "5" >5</option>
328      <option value = "6" >6</option>
329      <option value = "7" >7</option>
330      <option value = "8" >8</option>
331      <option value = "9" >9</option>
332      <option value = "10" >10</option>
333      <option value = "11" >11</option>
334      <option value = "12" selected = "selected">12</option>
335      <option value = "13" >13</option>
336      <option value = "14" >14</option>
337      <option value = "15" >15</option>
338      <option value = "16" >16</option>
339      <option value = "17" >17</option>
340      <option value = "18" >18</option>
341      <option value = "19" >19</option>
342      <option value = "20" >20</option>
343      <option value = "21" >21</option>
344      <option value = "22" >22</option>
345      <option value = "23" >23</option>
346      <option value = "24" >24</option>
347      <option value = "25" >25</option>
348      <option value = "26" >26</option>
349      <option value = "27" >27</option>
350      <option value = "28" >28</option>
351      <option value = "29" >29</option>
352      <option value = "30" >30</option>
353      <option value = "31" >31</option>
354    </select>
355   
356    <select id = "date_creation_month" name = "date_creation_month">
357      <option label = "------------" value = "0">------------</option>
358      <option label = "Janvier"      value = "1">Janvier</option>
359      <option label = "Février"      value = "2">Février</option>
360      <option label = "Mars"         value = "3">Mars</option>
361      <option label = "Avril"        value = "4">Avril</option>
362      <option label = "Mai"          value = "5">Mai</option>
363      <option label = "Juin"         value = "6">Juin</option>
364      <option label = "Juillet"      value = "7">Juillet</option>
365      <option label = "Août"         value = "8">Août</option>
366      <option label = "Septembre"    value = "9">Septembre</option>
367      <option label = "Octobre"      value = "10" selected = "selected">Octobre</option>
368      <option label = "Novembre"     value = "11">Novembre</option>
369      <option label = "Décembre"     value = "12">Décembre</option>
370    </select>
371   
372    <input id = "date_creation_year" name = "date_creation_year" type = "text" size = "4" maxlength = "4" value = "2010">
373    {* <!-- date_creation_linked_date représente la date indiquée par les listes déroulantes, et permet de limiter
374            le choix dans la date, en l'occurrence à des dates uniquement postérieures (grâce au 6° paramètre de pwg_initialization_datepicker) --> *}
375    <input id = "date_creation_linked_date" name = "date_creation_linked_date" type = "hidden" size = "10" disabled = "disabled">
376    <script type = "text/javascript">
377      pwg_initialization_datepicker("#date_creation_day", "#date_creation_month",
378       "#date_creation_year", "#date_creation_linked_date", null, "#date_creation_linked_date");
379    </script><br />
380    <table>
381      <tr>
382        <td style = "text-align:right; vertical-align:top; font-weight:bold;">
383          Page à utiliser&nbsp;:&nbsp;&nbsp;
384        </td>
385        <td>
386          <label for = "ec_date_unknown_0_id">
387            <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id" />
388            {'Home'|@translate}
389          </label><br />
390          <label for = "ec_date_unknown_1_id">
391            <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id" />
392            {'Access denied'|@translate}
393          </label><br />
394          {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
395          <label class = "ec_date_block" for = "ec_date_in_up_aps_id" {if !$ec_ap_ok or count($ec_lists.add_pages)  ==  0} style = "display:none;" {/if} >
396            <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id" />
397            {'Additional Page'|@translate}<br />
398            <select class = "categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" >
399              {html_options options = $ec_lists.add_pages}
400            </select>
401          </label>
402        </td>
403      </tr>
404    </table>
405
406  </fieldset>
407 
408  <p style = "clear:both;">
409    <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/>
410    <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();"/>
411  </p>
412</form>
413
414{* <!-- JavaScript functions --> *}
415<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
416<script type = "text/javascript"><!--
417  ec_is_creation                          = {if $ec_is_creation}true{else}false{/if};
418  ec_up_code_lbl_forced_txt               = "{'Forced'|@translate}";
419  ec_JS_message['ec_gen_user_act_miss']   = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
420  ec_JS_message['ec_act_cat_miss']        = "{'ec_act_cat_miss'|@translate|@escape:javascript}";
421  ec_JS_message['ec_act_img_miss']        = "{'ec_act_img_miss'|@translate|@escape:javascript}";
422  ec_JS_message['ec_new_pwd_gen']         = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";
423  ec_JS_message['ec_clk_entry_miss']      = "{'ec_clk_entry_miss'|@translate|@escape:javascript}";
424  ec_JS_message['ec_confirm_force']       = "{'ec_confirm_force'|@translate|@escape:javascript}";
425  ec_JS_message['ec_confirm_del_other']   = "{'ec_confirm_del_other'|@translate|@escape:javascript}";
426  ec_JS_message['ec_user_already_exists'] = "{'ec_user_already_exists'|@translate|@escape:javascript}";
427  ec_JS_message['ec_code_already_exists'] = "{'ec_code_already_exists'|@translate|@escape:javascript}";
428  ec_JS_message['ec_conf_pwd_dont_match'] = "{'ec_conf_pwd_dont_match'|@translate|@escape:javascript}";
429  ec_JS_message['ec_confirm_change_user'] = "{'ec_confirm_change_user'|@translate|@escape:javascript}";
430  ec_JS_message['Home']                   = "{'Home'|@translate}";
431  ec_JS_message['ec_submit_code_miss']    = "{'ec_submit_code_miss'|@translate}";
432  ec_JS_message['ec_submit_user_miss']    = "{'ec_submit_user_miss'|@translate}";
433  ec_JS_message['ec_submit_action_miss']  = "{'ec_submit_action_miss'|@translate}";
434  ec_JS_message['ec_submit_code_bad']     = "{'ec_submit_code_bad'|@translate}";
435  ec_default_action                       = "{$ec_default_action}";
436  ec_default_entry                        = "{$ec_default_entry}";
437  ec_auto_code_digits_nb                  = "{$ec_def_auto_code_dg_nb}";
438  {if $ec_is_creation}
439    {foreach from = $ec_lists.duplicable_codes.ids key = ec_key item = ec_val}
440      ec_duplic_codes[{$ec_key}] = {$ec_val};
441    {/foreach}
442  {/if}
443  {foreach from = $ec_lists.ec_table item = ec_val name = listloop}
444    ec_lists_temp[{$smarty.foreach.listloop.index}]  =
445     "{$ec_val.id};{$ec_val.code};{$ec_val.user_id};{$ec_val.action};{$ec_val.arg1};{$ec_val.arg2};{$ec_val.forced};{$ec_val.comment}";
446  {/foreach}
447  ec_build_ec_lists();
448  ec_init();
449//--></script>
450
451{include file = $FooterIncTPL}
Note: See TracBrowser for help on using the repository browser.