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

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

[Event Cats] Add character "é" in all files so to keep them coded in UTF-8 w/o BOM

File size: 15.5 KB
Line 
1{* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
2
3{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
4
5{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'}
6
7{* <!-- Whether plugin Additionnal Pages is active or not --> *}
8<div style = "text-align:right; font-style:italic;">
9  {if $ec_ap_ok}
10    {'Additional Pages active'|@translate}
11    <script type = "text/javascript">
12      var ec_ap_ok = {if count($ec_lists.add_pages) == 0}false{else}true{/if};
13    </script>
14  {else}
15    {'Additional Pages inactive'|@translate}
16    <script type = "text/javascript">
17      var ec_ap_ok = false;
18    </script>
19  {/if}
20</div>
21
22{* <!-- Parameters list --> *}
23<form class = "filter" method = "post" name = "ec_new_code" action = "" onsubmit = "return ec_check_submit();">
24  <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
25  <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel" />
26 
27  {* <!-- Page title. Can be "New entry" or "Entry modification" --> *}
28  <div style = "text-align:center;">
29    <a style = "font-weight:bold; font-size:120%;" href = "#ec_top" name = "ec_top" title = "{'Place title on top ttip'|@translate}">
30      <!--[if !IE]> <--> <label> <!--> <![endif]-->
31        {if $ec_is_creation}
32          {'New entry title'|@translate}
33        {else}
34          {'Modify entry title'|@translate}
35        {/if}
36      <!--[if !IE]> <--> </label> <!--> <![endif]-->
37      <!-- What we're able to do for our "prefered" browser |-( ...!  -->
38    </a>
39    {if $ec_is_creation}
40      <br /><br />
41      <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'Full auto'|@translate}"
42       id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/>
43    {/if}
44  </div>
45 
46  {* <!-- [ [New / existing code] / [Existing entry] ] selection --> *}
47  <fieldset>
48    <legend style = "font-weight:bold;">
49      {if $ec_is_creation}
50        {'Code'|@translate}
51      {else}
52        {'Selected entry'|@translate}
53      {/if}
54    </legend>
55   
56      {if $ec_is_creation}
57        <li>
58          {* <!-- New code (to create) --> *}
59          <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code} >
60            <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_id" value = "new" id = "ec_sel_code_new"/>
61            {'New code'|@translate}
62          </label>
63          <span {$ec_hidden_when_no_code} >&nbsp;</span>
64          <label for = "ec_in_up_code_id" style = "margin:0;">
65            <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'Auto code button'|@translate}"
66             id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;"
67            />
68          </label>
69          {'Auto code mid'|@translate}
70          <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;">
71            {foreach from=$ec_auto_code_dg_nb item=ec_item name=listloop}
72              <option value = "{$ec_item}">
73                {$ec_item}
74                {if $smarty.foreach.listloop.index == 0}
75                  {'Auto code min'|@translate}
76                {/if}
77                {if $smarty.foreach.listloop.index == count($ec_auto_code_dg_nb) - 1}
78                  {'Auto code max'|@translate}
79                {/if}
80              </option>
81            {/foreach}
82          </select>
83          {'Auto code end'|@translate}<br />
84          <li style = "padding-left: 30px;">
85            <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
86             id = "ec_in_up_code_id" onblur = "ec_check_code_text(this.value);"
87            />
88            &nbsp;&#151;&nbsp;
89            <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
90              onchange = "ec_new_comment_text = this.value;" title = "{'Comment'|@translate}"
91            />
92          </li>
93        </li>
94       
95        <li>
96          {* <!-- Known code --> *}
97          <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}>
98            <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" />
99            {'Existing code'|@translate}
100          </label>
101          <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} >
102            {foreach from=$ec_lists.duplicable_codes.codes key=ec_key item=ec_val}
103              <option value = "{$ec_val.id}">
104                {$ec_key}
105                {if $ec_val.comment != ''}
106                  &nbsp;&#151;&nbsp;{$ec_val.comment}
107                {/if}
108              </option>
109            {/foreach}
110          </select>
111        </li>
112       
113      {else}
114       
115        {* <!-- Existing entry selection --> *}
116        <li>
117          {* <!-- Entry choice --> *}
118          <select name = "ec_in_up_entry_list" id = "ec_in_up_entry_list_id" onchange = "ec_mark_entry(this.value);">
119            {foreach from=$ec_lists.ec_table item=ec_val}
120              <option value = "{$ec_val.id}">
121                {$ec_val.id} : {$ec_val.code}
122                {if $ec_val.comment != ''}
123                  &nbsp;&#151;&nbsp;{$ec_val.comment}
124                {/if}
125              </option>
126            {/foreach}
127          </select>
128          &nbsp;&#151;&nbsp;
129          <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
130            onchange = "ec_new_comment_text = this.value;" title = "{'Comment'|@translate}"
131          />
132        </li>
133       
134      {/if}
135   
136  </fieldset>
137 
138  {* <!-- User to identify --> *}
139  <fieldset>
140    <legend style = "font-weight:bold;">
141      {'Identified user'|@translate}
142      <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span><br />
143    </legend>
144   
145      {if !$ec_is_creation}
146        <li>
147          {* <!-- None --> *}
148          <label onclick = "return ec_mark_user('ec_sel_user_none');">
149            <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none" />
150            {'No user'|@translate}
151          </label><br />
152        </li>
153      {/if}
154     
155      <li>
156        {* <!-- New user (to create) --> *}
157        <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} >
158          <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} />
159          {'New generic user'|@translate}
160        </label>
161        <span {$ec_hidden_when_no_user} >&nbsp;</span>
162        <label for = "ec_in_up_usr_txt_id" style = "margin:0;">
163          <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'Generate username'|@translate}"
164           id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
165          />
166        </label>
167        <li style = "padding-left: 30px;">
168          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br />
169            <input type = "text" name = "login" id = "ec_in_up_usr_txt_id" maxlength = "50"
170             size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();"
171            />
172          </label>
173          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br />
174            <input type = "text" name = "password" id = "ec_in_up_psd_txt_id" maxlength = "32"
175             size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();"
176            />
177          </label>
178          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br />
179            <input type = "password" id = "ec_confirm_psd_txt_id" maxlength = "32" size = "20"/>
180          </label>
181          <label class = "ec_block" onclick = "ec_check_grp_text(); return ec_mark_user('ec_sel_user_new');" for = "ec_in_up_grp_txt_id">
182            <input type = "checkbox" name = "ec_in_up_newgroup" id = "ec_in_up_newgroup_id"
183             onchange = "ec_selected_old_group = (this.checked != '');"
184            />
185            <span onMouseover = "ec_chk_over_grp = true;" onMouseout = "ec_chk_over_grp = false;">
186              {'New group'|@translate}
187            </span><br />
188            <input type = "text" name = "groupname" id = "ec_in_up_grp_txt_id" maxlength = "32"
189             size = "20" onblur = "ec_new_grp_text = this.value; if (this.value != '') ec_selected_old_group = true;"
190            />
191          </label>
192        </li><br />
193      </li>
194     
195      <li>
196        {* <!-- Known user --> *}
197        <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} >
198          <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" />
199          {'Existing user'|@translate}
200        </label>
201        <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} >
202          {foreach from=$ec_lists.user_ids key=ec_key item=ec_val}
203            <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option>
204          {/foreach}
205        </select><br />
206      </li>
207   
208  </fieldset>
209 
210  {* <!-- Page to display --> *}
211  <fieldset>
212    <legend style = "font-weight:bold;">{'Displayed page'|@translate}</legend>
213   
214    <li>
215      <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();">
216        <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id">
217        <span id = "ec_style_forced_id">&nbsp;</span>
218      </label>
219    </li>
220   
221    <li>
222      {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
223      <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');"
224       {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if}
225      >
226        <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" />
227        {'Additional Page'|@translate}<br />
228        <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
229          {html_options options=$ec_lists.add_pages}
230        </select>
231      </label>
232     
233      {* <!-- Category, provided at least one category is available --> *}
234      <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');"
235       {if count($ec_lists.categories) == 0} style = "display:none;" {/if}
236      >
237        <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id"
238          onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;"
239        />
240        <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'Category'|@translate}</span><br />
241        <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;">
242          {html_options options=$ec_lists.categories}
243        </select>
244      </label>
245     
246      {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *}
247      <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');"
248       {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if}
249      >
250        <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" />
251        {'Image id'|@translate}<br />
252        <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6"
253         size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');"
254        /><br />
255        <span id = "ec_in_up_imgs_warn">&nbsp;</span><br />
256      </label>
257     
258      {* <!-- Index page --> *}
259      <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');">
260        <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" />
261        {'Home'|@translate}
262      </label>
263     
264      {* <!-- Access denied page (only when modifying an entry) --> *}
265      {if !$ec_is_creation}
266        <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');">
267          <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" />
268          {'Access denied'|@translate}
269        </label>
270      {/if}
271    </li>
272   
273  </fieldset>
274 
275  <p>
276    <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/>
277    <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();"/>
278  </p>
279</form>
280
281{* <!-- JavaScript functions --> *}
282<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
283<script type = "text/javascript"><!--
284  ec_is_creation                          = {if $ec_is_creation}true{else}false{/if};
285  ec_up_code_lbl_forced_txt               = "{'Forced'|@translate}";
286  ec_JS_message['ec_gen_user_act_miss']   = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
287  ec_JS_message['ec_act_cat_miss']        = "{'ec_act_cat_miss'|@translate|@escape:javascript}";
288  ec_JS_message['ec_act_img_miss']        = "{'ec_act_img_miss'|@translate|@escape:javascript}";
289  ec_JS_message['ec_new_pwd_gen']         = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";
290  ec_JS_message['ec_act_entry_miss']      = "{'ec_act_entry_miss'|@translate|@escape:javascript}";
291  ec_JS_message['ec_confirm_force']       = "{'ec_confirm_force'|@translate|@escape:javascript}";
292  ec_JS_message['ec_confirm_del_other']   = "{'ec_confirm_del_other'|@translate|@escape:javascript}";
293  ec_JS_message['ec_user_already_exists'] = "{'ec_user_already_exists'|@translate|@escape:javascript}";
294  ec_JS_message['ec_code_already_exists'] = "{'ec_code_already_exists'|@translate|@escape:javascript}";
295  ec_JS_message['ec_conf_pwd_dont_match'] = "{'ec_conf_pwd_dont_match'|@translate|@escape:javascript}";
296  ec_JS_message['ec_confirm_change_user'] = "{'ec_confirm_change_user'|@translate|@escape:javascript}";
297  ec_JS_message['Home']                   = "{'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  {if $ec_is_creation}
306    {foreach from=$ec_lists.duplicable_codes.ids key=ec_key item=ec_val}
307      ec_duplic_codes[{$ec_key}] = {$ec_val};
308    {/foreach}
309  {/if}
310  {foreach from=$ec_lists.ec_table item=ec_val name=listloop}
311    ec_lists_temp[{$smarty.foreach.listloop.index}] =
312     "{$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}";
313  {/foreach}
314  ec_build_ec_lists();
315  ec_init();
316//--></script>
317
318{include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'}
Note: See TracBrowser for help on using the repository browser.