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

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

[Event Cats] Continue add entry modification ability

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