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

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

[Event Cats] PNG, JS, TPL and CSS normally finished now. Remains "only" PHP and SQL...

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