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

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

[Event Cats] '1.1.3' Better help banner management ; finalize banner texts

File size: 16.6 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      {'Show'|@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      {'Hide'|@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            <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}">
106              <span style = "font-weight:bold;  font-style:italic;">{'Comment'|@translate}</span>
107              <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
108                onchange = "ec_new_comment_text = this.value;"
109              />
110            </label>
111          </li>
112        </li>
113       
114        <li>
115          {* <!-- Known code --> *}
116          <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}>
117            <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" />
118            {'Existing code'|@translate}
119          </label>
120          <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} >
121            {foreach from=$ec_lists.duplicable_codes.codes key=ec_key item=ec_val}
122              <option value = "{$ec_val.id}">
123                {$ec_key}
124                {if $ec_val.comment != ''}
125                  &nbsp;&#151;&nbsp;{$ec_val.comment}
126                {/if}
127              </option>
128            {/foreach}
129          </select>
130        </li>
131       
132      {else}
133       
134        {* <!-- Existing entry selection --> *}
135        <li>
136          {* <!-- Entry choice --> *}
137          <select name = "ec_in_up_entry_list" id = "ec_in_up_entry_list_id" onchange = "ec_mark_entry(this.value);">
138            {foreach from=$ec_lists.ec_table item=ec_val}
139              <option value = "{$ec_val.id}">
140                {$ec_val.id} : {$ec_val.code}
141                {if $ec_val.comment != ''}
142                  &nbsp;&#151;&nbsp;{$ec_val.comment}
143                {/if}
144              </option>
145            {/foreach}
146          </select>
147          &nbsp;&#151;&nbsp;
148            <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}">
149              <span style = "font-weight:bold;  font-style:italic;">{'Comment'|@translate}</span>
150              <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
151                onchange = "ec_new_comment_text = this.value;"
152              />
153            </label>
154        </li>
155       
156      {/if}
157   
158  </fieldset>
159 
160  {* <!-- User to identify --> *}
161  <fieldset>
162    <legend style = "font-weight:bold;">
163      {'Identified user'|@translate}
164      <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span><br />
165    </legend>
166   
167      {if !$ec_is_creation}
168        <li>
169          {* <!-- None --> *}
170          <label onclick = "return ec_mark_user('ec_sel_user_none');">
171            <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none" />
172            {'No user'|@translate}
173          </label><br />
174        </li>
175      {/if}
176     
177      <li>
178        {* <!-- New user (to create) --> *}
179        <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} >
180          <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} />
181          {'New generic user'|@translate}
182        </label>
183        <span {$ec_hidden_when_no_user} >&nbsp;</span>
184        <label for = "ec_in_up_usr_txt_id" style = "margin:0;">
185          <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'Generate username'|@translate}"
186           id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
187          />
188        </label>
189        <li style = "padding-left: 30px;">
190          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br />
191            <input type = "text" name = "login" id = "ec_in_up_usr_txt_id" maxlength = "50"
192             size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();"
193            />
194          </label>
195          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br />
196            <input type = "text" name = "password" id = "ec_in_up_psd_txt_id" maxlength = "32"
197             size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();"
198            />
199          </label>
200          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br />
201            <input type = "password" id = "ec_confirm_psd_txt_id" maxlength = "32" size = "20"/>
202          </label>
203          <label class = "ec_block" onclick = "ec_check_grp_text(); return ec_mark_user('ec_sel_user_new');" for = "ec_in_up_grp_txt_id">
204            <input type = "checkbox" name = "ec_in_up_newgroup" id = "ec_in_up_newgroup_id"
205             onchange = "ec_selected_old_group = (this.checked != '');"
206            />
207            <span onMouseover = "ec_chk_over_grp = true;" onMouseout = "ec_chk_over_grp = false;">
208              {'New group'|@translate}
209            </span><br />
210            <input type = "text" name = "groupname" id = "ec_in_up_grp_txt_id" maxlength = "32"
211             size = "20" onblur = "ec_new_grp_text = this.value; if (this.value != '') ec_selected_old_group = true;"
212            />
213          </label>
214        </li><br />
215      </li>
216     
217      <li>
218        {* <!-- Known user --> *}
219        <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} >
220          <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" />
221          {'Existing user'|@translate}
222        </label>
223        <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} >
224          {foreach from=$ec_lists.user_ids key=ec_key item=ec_val}
225            <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option>
226          {/foreach}
227        </select><br />
228      </li>
229   
230  </fieldset>
231 
232  {* <!-- Page to display --> *}
233  <fieldset>
234    <legend style = "font-weight:bold;">{'Displayed page'|@translate}</legend>
235   
236    <li>
237      <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();">
238        <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id">
239        <span id = "ec_style_forced_id">&nbsp;</span>
240      </label>
241    </li>
242   
243    <li>
244      {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
245      <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');"
246       {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if}
247      >
248        <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" />
249        {'Additional Page'|@translate}<br />
250        <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
251          {html_options options=$ec_lists.add_pages}
252        </select>
253      </label>
254     
255      {* <!-- Category, provided at least one category is available --> *}
256      <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');"
257       {if count($ec_lists.categories) == 0} style = "display:none;" {/if}
258      >
259        <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id"
260          onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;"
261        />
262        <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'Category'|@translate}</span><br />
263        <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;">
264          {html_options options=$ec_lists.categories}
265        </select>
266      </label>
267     
268      {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *}
269      <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');"
270       {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if}
271      >
272        <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" />
273        {'Image id'|@translate}<br />
274        <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6"
275         size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');"
276        /><br />
277        <span id = "ec_in_up_imgs_warn">&nbsp;</span><br />
278      </label>
279     
280      {* <!-- Index page --> *}
281      <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');">
282        <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" />
283        {'Home'|@translate}
284      </label>
285     
286      {* <!-- Access denied page (only when modifying an entry) --> *}
287      {if !$ec_is_creation}
288        <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');">
289          <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" />
290          {'Access denied'|@translate}
291        </label>
292      {/if}
293    </li>
294   
295  </fieldset>
296 
297  <p>
298    <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/>
299    <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();"/>
300  </p>
301</form>
302
303{* <!-- JavaScript functions --> *}
304<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
305<script type = "text/javascript"><!--
306  ec_is_creation                          = {if $ec_is_creation}true{else}false{/if};
307  ec_up_code_lbl_forced_txt               = "{'Forced'|@translate}";
308  ec_JS_message['ec_gen_user_act_miss']   = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
309  ec_JS_message['ec_act_cat_miss']        = "{'ec_act_cat_miss'|@translate|@escape:javascript}";
310  ec_JS_message['ec_act_img_miss']        = "{'ec_act_img_miss'|@translate|@escape:javascript}";
311  ec_JS_message['ec_new_pwd_gen']         = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";
312  ec_JS_message['ec_act_entry_miss']      = "{'ec_act_entry_miss'|@translate|@escape:javascript}";
313  ec_JS_message['ec_confirm_force']       = "{'ec_confirm_force'|@translate|@escape:javascript}";
314  ec_JS_message['ec_confirm_del_other']   = "{'ec_confirm_del_other'|@translate|@escape:javascript}";
315  ec_JS_message['ec_user_already_exists'] = "{'ec_user_already_exists'|@translate|@escape:javascript}";
316  ec_JS_message['ec_code_already_exists'] = "{'ec_code_already_exists'|@translate|@escape:javascript}";
317  ec_JS_message['ec_conf_pwd_dont_match'] = "{'ec_conf_pwd_dont_match'|@translate|@escape:javascript}";
318  ec_JS_message['ec_confirm_change_user'] = "{'ec_confirm_change_user'|@translate|@escape:javascript}";
319  ec_JS_message['Home']                   = "{'Home'|@translate}";
320  ec_JS_message['ec_submit_code_miss']    = "{'ec_submit_code_miss'|@translate}";
321  ec_JS_message['ec_submit_user_miss']    = "{'ec_submit_user_miss'|@translate}";
322  ec_JS_message['ec_submit_action_miss']  = "{'ec_submit_action_miss'|@translate}";
323  ec_JS_message['ec_submit_code_bad']     = "{'ec_submit_code_bad'|@translate}";
324  ec_default_action                       = "{$ec_default_action}";
325  ec_default_entry                        = "{$ec_default_entry}";
326  ec_auto_code_digits_nb                  = "{$ec_def_auto_code_dg_nb}";
327  {if $ec_is_creation}
328    {foreach from=$ec_lists.duplicable_codes.ids key=ec_key item=ec_val}
329      ec_duplic_codes[{$ec_key}] = {$ec_val};
330    {/foreach}
331  {/if}
332  {foreach from=$ec_lists.ec_table item=ec_val name=listloop}
333    ec_lists_temp[{$smarty.foreach.listloop.index}] =
334     "{$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}";
335  {/foreach}
336  ec_build_ec_lists();
337  ec_init();
338//--></script>
339
340{include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'}
Note: See TracBrowser for help on using the repository browser.