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

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

[Event Cats] Implement help banner

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