source: extensions/event_cats/admin/evntcats_admin.tpl @ 3985

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

[Event Cats] Form submit beginning, "forced problem" improvement

File size: 15.4 KB
Line 
1{* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
2
3{* <!-- Page title --> *}
4<div class = "titrePage" style="margin-top: -20px;">
5  <h2>{'ec_admin_page_title'|@translate} {$EVNTCATS_VERSION}</h2>
6</div>
7
8{* <!-- JavaScript warning message --> *}
9<div id = "ec_js_warn">
10  {'ec_javascript_needed'|@translate}<br><br>
11</div>
12<script type = "text/javascript"><!-- // Removes JavaScript warning message
13  document.getElementById('ec_js_warn').innerHTML = ''; //-->
14</script>
15
16{* <!-- EC Presentation --> *}
17{if $ec_howto}
18  <div>
19    {'ec_admin_page_howto'|@translate}
20  </div>
21{/if}
22
23<p>
24  <hr width = 75% size = 3 />
25</p>
26
27{* <!-- Whether plugin Additionnal Pages is active or not --> *}
28<div style = "text-align:right; font-style:italic;">
29  {if $ec_ap_ok}
30    {'ec_plugin_ap_ok'|@translate}
31    <script type = "text/javascript"><!--
32      var ec_ap_ok = true; //-->
33    </script>
34  {else}
35    {'ec_plugin_ap_nok'|@translate}
36    <script type = "text/javascript"><!--
37      var ec_ap_ok = false; //-->
38    </script>
39  {/if}
40</div>
41
42{* <!-- First section : form to view and modify codes, or create a new one --> *}
43<form class = "filter" method = "post" name = "ec_up_code" action = "">
44  <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
45 
46  <div style = "text-align:center; font-weight:bold; font-size:120%;">{'ec_entry_table_title'|@translate}</div><br>
47 
48  <table class = "table2" width = "97%"> {* <!-- Table to show codes present in MySQL table --> *}
49    <thead>
50      <tr class = "throw">
51        <td>{'ec_col_name_entry'|@translate}</td>
52        <td>{'ec_col_name_code'|@translate}</td>
53        <td>{'ec_col_name_user'|@translate}</td>
54        <td>{'ec_col_name_bhvr'|@translate}</td>
55        <td>{'ec_col_name_dspl'|@translate}</td>
56        <td>{'ec_col_name_actn'|@translate}</td>
57      </tr>
58    </thead>
59   
60    {foreach from=$code_list item=code_line name=code_loop}
61      <tr class = "{if $smarty.foreach.code_loop.index is odd}row1{else}row2{/if}">
62        <td>
63          <input type = "radio" name = "ec_entry_sel" value = "{$code_line.id}" id = "selection-{$code_line.id}"
64           onclick = "ec_mark_line({$code_line.id});"
65          />
66          <label for = "selection-{$code_line.id}">&nbsp;{$code_line.id}</label>
67        </td>
68        <td><label for = "selection-{$code_line.id}">{$code_line.Code}</label></td>
69        <td><label for = "selection-{$code_line.id}">{$code_line.Username}</label></td>
70        <td><label for = "selection-{$code_line.id}">{$code_line.Action|@translate}</label></td>
71        <td><label for = "selection-{$code_line.id}">{$code_line.Arg1}</label></td>
72        <td>
73          <a
74           href = "{$code_line.code_URL}" title = "{'ec_test_tooltip'|@translate}"
75           name = "ec_code_URL" onclick = "return ec_check_tst({$code_line.id});"
76          />
77            <img src = "{$EVNTCATS_URLS.ROOT}icon/url2.png" class = "button" style = "border:none"
78             alt = "{'ec_test_tooltip'|@translate}" title = "{'ec_test_tooltip'|@translate}" />
79          </a>
80          &nbsp;
81          <a href = "javascript:void();" onclick = "ec_check_d({$code_line.id}, 'delete');">
82            <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button"
83             alt = "{'ec_url_delete'|@translate}" title = "{'ec_url_delete'|@translate}" />
84          </a>
85          {if $code_line.log_OK}
86            &nbsp;
87            <a href = "javascript:void();" onclick = "ec_check_d({$code_line.id}, 'disable');">
88              <img src = "{$EVNTCATS_URLS.ROOT}icon/disable.png" class = "button"
89               alt = "{'ec_url_disable'|@translate}" title = "{'ec_url_disable'|@translate}" />
90            </a>
91            {if $code_line.Forced == 'true'}
92              &nbsp;
93              <a href = "javascript:void()" title = "{'ec_toggle_forced'|@translate}" onclick = "return ec_toggle_forced({$code_line.id});">
94                <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/forced.png"
95                 {if $code_line.f_pb} style = "border:solid medium red;" {/if}
96                 alt = "{'ec_url_forced'|@translate}" title = "{'ec_url_forced'|@translate}"
97                />
98              </a>
99            {else}
100              &nbsp;
101              <a href = "javascript:void()" title = "{'ec_toggle_forced'|@translate}" onclick = "return ec_toggle_forced({$code_line.id});">
102                <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/nforced.png"
103                 alt = "{'ec_url_nforced'|@translate}" title = "{'ec_url_nforced'|@translate}"/>
104              </a>
105              {if !$code_line.f_pb}
106                &nbsp;
107                <a href = "javascript:void()" title = "{'ec_duplicate_entry'|@translate}" onclick = "return ec_duplicate_entry({$code_line.id});">
108                  <img src = "{$EVNTCATS_URLS.ROOT}icon/duplicate.png" class = "button" style = "border:none"
109                   alt = "{'ec_url_duplicate'|@translate}" title = "{'ec_url_duplicate'|@translate}" />
110                </a>
111              {/if}
112            {/if}
113          {/if}
114        </td>
115      </tr>
116    {/foreach}
117  </table>
118 
119  {* <!-- This is not really a table, looks like a unique cell at the end of previous table,
120  to show URL for currently selected line in above table --> *}
121  <table class = "table2" width = "97%">
122    <tr class = "row2">
123      <td style = "text-align:center; padding-top:5px; padding-bottom:5px;">
124        <label title = "{'ec_url_tooltip'|@translate}">
125          {'ec_show_URL'|@translate}
126          <input type = "text" id = "ec_show_URL" size = "100%" title = "{'ec_url_tooltip'|@translate}" readonly = "readonly" />
127        </label>
128      </td>
129    </tr>
130  </table><br>
131 
132  {* <!-- Parameters list --> *}
133  <table style="border-spacing:30px" width = "97%">
134   
135    {* <!-- New entry --> *}
136    <tr>
137      <td>
138        <label for = "selection--1" onclick = "ec_mark_line(-1);">
139          <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" onclick = "ec_mark_line(-1);" />
140          <span style = "font-weight:bold; font-style:italic; font-size:120%; text-decoration:underline;">{'ec_create_modify_code'|@translate}</span>
141        </label>
142      </td>
143      <td>
144        <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'ec_new_full_auto'|@translate}"
145         id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"
146        /><br>
147      </td>
148    </tr>
149   
150    {* <!-- Code selection --> *}
151    <tr>
152      <td><strong><span onclick = "Test();">{'ec_new_entry'|@translate}</span></strong></td>
153      <td>
154        <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
155         id = "ec_in_up_code_id" onclick = "ec_mark_line(-1);" onblur = "ec_new_code_text = this.value;"
156        />
157        &nbsp;
158        <label for = "ec_in_up_code_id" style = "margin:0;">
159          <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'ec_new_entry_button'|@translate}"
160           id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;"
161          />
162        </label>
163        {'ec_gen_code_nb_pre'|@translate}
164        <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;">
165          <option value = "4">4</option>
166          <option value = "5">5</option>
167          <option value = "8">8</option>
168          <option value = "10" selected = "selected">10</option>
169          <option value = "12">12</option>
170          <option value = "15">15</option>
171          <option value = "16">16</option>
172          <option value = "20">20</option>
173          <option value = "24">24</option>
174          <option value = "25">25</option>
175          <option value = "30">30</option>
176          <option value = "32">32{'ec_gen_code_nb_max'|@translate}</option>
177        </select>
178        {'ec_gen_code_nb_end'|@translate}
179      </td>
180    </tr>
181   
182    {* <!-- User to identify --> *}
183    <tr>
184      <td style = "vertical-align:top;"><strong>{'ec_up_code_lbl_user'|@translate}</strong></td>
185      <td>
186      <li>
187        {* <!-- None --> *}
188        <label onclick = "ec_mark_user('ec_sel_user_none');">
189          <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none"
190           onclick = "ec_mark_user('ec_sel_user_none');"
191          />
192          {'ec_up_code_lbl_user_none'|@translate}
193        </label><br>
194      </li>
195       
196      <li>
197        {* <!-- New user (to create) --> *}
198        <label for = "ec_in_up_usr_txt_id" onclick = "ec_mark_user('ec_sel_user_new');">
199          <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_txt_id" value = "new"
200           id = "ec_sel_user_new" onclick = "ec_mark_user('ec_sel_user_new');"
201          />
202          {'ec_up_code_lbl_user_new'|@translate}
203        </label>
204        &nbsp;
205        <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'ec_up_code_lbl_gen_user'|@translate}"
206         id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
207        /><br>
208        <ul><li>
209          <label class = "ec_block">{'ec_new_user_name'|@translate}<br>
210            <input type = "text" name = "ec_in_up_usr_txt" id = "ec_in_up_usr_txt_id" maxlength = "32"
211             size = "20" onclick = "ec_mark_user('ec_sel_user_new');" onblur = "ec_new_user_text = this.value;"
212            />
213          </label>
214          <label class = "ec_block">{'ec_new_user_pswd'|@translate}<br>
215            <input type = "text" name = "ec_in_up_psd_txt" id = "ec_in_up_psd_txt_id" maxlength = "32"
216             size = "20" onclick = "ec_mark_user('ec_sel_user_new');" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();"
217            />
218          </label>
219          <label class = "ec_block">&nbsp;<br>
220            <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span>
221          </label>
222         
223        </li></ul><br>
224      </li>
225     
226      <li>
227        {* <!-- Known user --> *}
228        <label for = "ec_in_up_usr_list_id" onclick = "ec_mark_user('ec_sel_user_old');">
229          <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_list_id"
230           value = "old" id = "ec_sel_user_old" onclick = "ec_mark_user('ec_sel_user_old');"
231          />
232          {'ec_up_code_lbl_user_old'|@translate}
233        </label>
234        <select name = "ec_in_up_usr_list" id = "ec_in_up_usr_list_id" onclick = "ec_mark_user('ec_sel_user_old');"
235         onchange = "ec_selected_old_user = this.value;"
236        >
237          <option label = "------------" value = "-1" id = "ec_old_user_-1">------------</option>
238          {foreach from=$ec_lists.user_ids key=ec_key item=ec_val name=opt_loop}
239            <option label = "{$ec_val}" value = "{$ec_key}" id = "ec_old_user_{$ec_key}">{$ec_val}</option>
240          {/foreach}
241        </select><br>
242      </li>
243      </td>
244    </tr>
245   
246    {* <!-- Page to display --> *}
247    <tr>
248      <td style = "vertical-align:top;"><strong>{'ec_up_code_lbl_action'|@translate}</strong></td>
249      <td>
250       
251        {* <!-- Additionnal Page, provided the plugin is activated --> *}
252        <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "ec_mark_action('ec_input_action_add_p');"
253         {if !$ec_ap_ok}style = "display:none;"{/if}
254        >
255          <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id"
256           onclick = "ec_mark_action('ec_input_action_add_p');"
257          />
258          {'ec_up_code_lbl_aps'|@translate}<br>
259          <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id"
260           onclick = "ec_mark_action('ec_input_action_add_p');" onchange = "ec_selected_AP = this.value;"
261          >
262            <option label = "------------" value = "-1" style = "display:none;">------------</option>
263            {html_options options=$ec_lists.add_pages}
264          </select>
265        </label>
266       
267        {* <!-- Category --> *}
268        <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "ec_mark_action('ec_input_action_cat');">
269          <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id"
270           onclick = "ec_mark_action('ec_input_action_cat');"
271          />
272          {'ec_up_code_lbl_cats'|@translate}<br>
273          <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id"
274           onclick = "ec_mark_action('ec_input_action_cat');" onchange = "ec_selected_cat = this.value;"
275          >
276            <option label = "------------" value = "-1" style = "display:none;">------------</option>
277            {html_options options=$ec_lists.categories}
278          </select>
279        </label>
280       
281        {* <!-- Image --> *}
282        <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "ec_mark_action('ec_input_action_img');">
283          <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id"
284           onclick = "ec_mark_action('ec_input_action_img');"
285          />
286          {'ec_up_code_lbl_img'|@translate}<br>
287          <input type = "text" name = "ec_in_up_imgs" id = "ec_in_up_imgs_id" maxlength = "6"
288           size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "ec_mark_action('ec_input_action_img');"
289          /><br>
290          <span id = "ec_in_up_imgs_warn">&nbsp;</span>
291        </label>
292       
293        {* <!-- Index page --> *}
294        <label class = "ec_block" onclick = "ec_mark_action('ec_input_action_home');">
295          <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home"
296           onclick = "ec_mark_action('ec_input_action_home');"
297          />
298          {'ec_up_code_lbl_home'|@translate}
299        </label>
300      </td>
301    </tr>
302  </table>
303  <p>
304    <input class = "submit" type = "submit" name = "ec_submit" value = "{'Submit'|@translate}"/>
305    <input class = "submit" type = "reset" name = "ec_reset" value = "{'Reset'|@translate}" onclick = "ec_init();"/>
306  </p>
307</form>
308
309{* <!-- JavaScript functions --> *}
310<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/evntcats_admin.js"></script>
311<script type = "text/javascript">
312  <!--
313 
314  // ec_test();
315 
316  ec_checked_URL[-1] = '';
317  {foreach from=$code_list key=ec_key item=code_line name=code_loop}
318    ec_checked_URL[{$ec_key}] = '{$code_line.code_URL}';
319  {/foreach}
320 
321  ec_JS_message['ec_confirm_disable']   = "{'ec_confirm_disable'|@translate|@escape:javascript}";
322  ec_JS_message['ec_confirm_delete']    = "{'ec_confirm_delete'|@translate|@escape:javascript}";
323  ec_JS_message['ec_confirm_test']      = "{'ec_confirm_test'|@translate|@escape:javascript}";
324  ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
325  ec_JS_message['ec_act_cat_miss']      = "{'ec_act_cat_miss'|@translate|@escape:javascript}";
326  ec_JS_message['ec_new_pwd_gen']       = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";
327 
328  ec_init();
329 
330  {literal}
331 
332  function Test() {                                                /*
333    document.getElementById('ec_sel_user_none').checked = '';
334    document.getElementById('ec_sel_user_new').checked = '';
335    document.getElementById('ec_sel_user_old').checked = '';       */
336  }
337 
338  //-->{/literal}
339</script>
340
341{* <!-- {$test0tpl} --> *}
342<p>$_GET :</p>
343{$GET}
344<p>$_POST :</p>
345{$POST}
346<p>Autres :</p>
347{$test1tpl}
348{$test2tpl}
349{$test3tpl}
350
351{* <!--
352--> *}
353
354{* Peut-être utile ?
355
356Colonne "outils" :
357Titre colonne :
358Cellules :
359          <td style = "text-align:center;">
360          </td>
361
362*}
Note: See TracBrowser for help on using the repository browser.