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

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

[Event Cats] Adaptation for PEM

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