[3999] | 1 | {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *} |
---|
| 2 | |
---|
[4048] | 3 | {include file='../../../plugins/event_cats/admin/template/header.inc.tpl'} |
---|
[3999] | 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 --> *} |
---|
[4019] | 21 | <form class = "filter" method = "post" name = "ec_new_code" action = "" onsubmit = "return ec_check_submit();"> |
---|
[4002] | 22 | <input type = "hidden" id = "ec_act1_id" name = "ec_act1" /> |
---|
[4058] | 23 | <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel" /> |
---|
[3999] | 24 | |
---|
[4157] | 25 | {* <!-- Page title. Can be "New entry" or "Entry modification" --> *} |
---|
[4002] | 26 | <div style = "text-align:center;"> |
---|
[4157] | 27 | <a style = "font-weight:bold; font-size:120%;" href = "#ec_top" name = "ec_top" title = "{'ec_top_title'|@translate}"> |
---|
[4181] | 28 | <!--[if !IE]> <--> <label> <!--> <![endif]--> |
---|
[4157] | 29 | {if $ec_is_creation} |
---|
| 30 | {'ec_new_entry_title'|@translate} |
---|
| 31 | {else} |
---|
| 32 | {'ec_modify_entry_title'|@translate} |
---|
[4092] | 33 | {/if} |
---|
[4181] | 34 | <!--[if !IE]> <--> </label> <!--> <![endif]--> |
---|
| 35 | <!-- What we're able to do for our "prefered" browser |-( ...! --> |
---|
[4157] | 36 | </a> |
---|
[4058] | 37 | {if $ec_is_creation} |
---|
| 38 | <br><br> |
---|
| 39 | <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'ec_new_full_auto'|@translate}" |
---|
| 40 | id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/> |
---|
| 41 | {/if} |
---|
[4027] | 42 | </div><br> |
---|
[4002] | 43 | |
---|
[4092] | 44 | {* <!-- Table (borders not visible) with 3 rows for parameters adjustment --> *} |
---|
[4027] | 45 | <table style = "border-spacing:15px" width = "97%"> |
---|
[3999] | 46 | |
---|
| 47 | <tr> |
---|
[4092] | 48 | |
---|
| 49 | {* <!-- [ [New / existing code] / [Existing entry] ] selection --> *} |
---|
[4058] | 50 | <td style = "vertical-align:top; font-weight:bold;"> |
---|
| 51 | {if $ec_is_creation} |
---|
| 52 | {'ec_new_entry'|@translate} |
---|
| 53 | {else} |
---|
| 54 | {'ec_sel_entry'|@translate} |
---|
| 55 | {/if} |
---|
| 56 | </td> |
---|
[3999] | 57 | <td> |
---|
[4058] | 58 | {if $ec_is_creation} |
---|
| 59 | <li> |
---|
| 60 | {* <!-- New code (to create) --> *} |
---|
| 61 | <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code} > |
---|
[4112] | 62 | <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_id" value = "new" id = "ec_sel_code_new"/> |
---|
[4058] | 63 | {'ec_up_code_lbl_code_new'|@translate} |
---|
| 64 | </label> |
---|
[4112] | 65 | <span {$ec_hidden_when_no_code} > </span> |
---|
[4058] | 66 | <label for = "ec_in_up_code_id" style = "margin:0;"> |
---|
| 67 | <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'ec_new_entry_button'|@translate}" |
---|
| 68 | id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;" |
---|
| 69 | /> |
---|
| 70 | </label> |
---|
| 71 | {'ec_gen_code_nb_pre'|@translate} |
---|
| 72 | <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;"> |
---|
| 73 | <option value = "4" >4{'ec_gen_code_nb_min'|@translate}</option> |
---|
| 74 | <option value = "5" >5</option> |
---|
| 75 | <option value = "8" >8</option> |
---|
| 76 | <option value = "10">10</option> |
---|
| 77 | <option value = "12">12</option> |
---|
| 78 | <option value = "15">15</option> |
---|
| 79 | <option value = "16">16</option> |
---|
| 80 | <option value = "20">20</option> |
---|
| 81 | <option value = "24">24</option> |
---|
| 82 | <option value = "25">25</option> |
---|
| 83 | <option value = "30">30</option> |
---|
| 84 | <option value = "32">32{'ec_gen_code_nb_max'|@translate}</option> |
---|
| 85 | </select> |
---|
| 86 | {'ec_gen_code_nb_end'|@translate}<br> |
---|
| 87 | <ul><li> |
---|
| 88 | <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40" |
---|
[4157] | 89 | id = "ec_in_up_code_id" onblur = "ec_check_code_text(this.value);" |
---|
[4058] | 90 | /> |
---|
| 91 | </li></ul> |
---|
| 92 | </li> |
---|
| 93 | |
---|
| 94 | <li> |
---|
| 95 | {* <!-- Known code --> *} |
---|
| 96 | <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}> |
---|
[4112] | 97 | <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" /> |
---|
[4058] | 98 | {'ec_up_code_lbl_code_old'|@translate} |
---|
| 99 | </label> |
---|
[4116] | 100 | <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} > |
---|
[4092] | 101 | {foreach from=$ec_lists.duplicable_codes.codes key=ec_key item=ec_val} |
---|
[4116] | 102 | <option value = "{$ec_val.id}">{$ec_key}</option> |
---|
[4058] | 103 | {/foreach} |
---|
| 104 | </select><br> |
---|
| 105 | </li> |
---|
| 106 | |
---|
| 107 | {else} |
---|
| 108 | |
---|
[4092] | 109 | {* <!-- Existing entry selection --> *} |
---|
[4058] | 110 | <li> |
---|
| 111 | {* <!-- Entry choice --> *} |
---|
| 112 | <select name = "ec_in_up_entry_list" id = "ec_in_up_entry_list_id" onchange = "ec_mark_entry(this.value);"> |
---|
| 113 | {foreach from=$ec_lists.ec_table item=ec_val} |
---|
[4112] | 114 | <option value = "{$ec_val.id}">{$ec_val.id} : {$ec_val.code}</option> |
---|
[4058] | 115 | {/foreach} |
---|
| 116 | </select> |
---|
| 117 | </li> |
---|
| 118 | |
---|
| 119 | {/if} |
---|
[3999] | 120 | </td> |
---|
| 121 | </tr> |
---|
| 122 | |
---|
| 123 | {* <!-- User to identify --> *} |
---|
| 124 | <tr> |
---|
[4158] | 125 | <td style = "vertical-align:top; font-weight:bold;"> |
---|
| 126 | {'ec_up_code_lbl_user'|@translate}<br> |
---|
| 127 | <br> |
---|
| 128 | <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn1"> </span><br> |
---|
| 129 | <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn2"> </span> |
---|
| 130 | </td> |
---|
[3999] | 131 | <td> |
---|
[4058] | 132 | {if !$ec_is_creation} |
---|
| 133 | <li> |
---|
| 134 | {* <!-- None --> *} |
---|
[4064] | 135 | <label onclick = "return ec_mark_user('ec_sel_user_none');"> |
---|
[4112] | 136 | <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none" /> |
---|
[4058] | 137 | {'ec_up_code_lbl_user_none'|@translate} |
---|
| 138 | </label><br> |
---|
| 139 | </li> |
---|
| 140 | {/if} |
---|
| 141 | |
---|
[4027] | 142 | <li> |
---|
| 143 | {* <!-- New user (to create) --> *} |
---|
[4064] | 144 | <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} > |
---|
[4112] | 145 | <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} /> |
---|
[4027] | 146 | {'ec_up_code_lbl_user_new'|@translate} |
---|
[3999] | 147 | </label> |
---|
[4112] | 148 | <span {$ec_hidden_when_no_user} > </span> |
---|
[4115] | 149 | <label for = "ec_in_up_usr_txt_id" style = "margin:0;"> |
---|
[4112] | 150 | <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'ec_up_code_lbl_gen_user'|@translate}" |
---|
| 151 | id = "ec_submit_gen_user_id" onclick = "ec_gen_user();" |
---|
| 152 | /> |
---|
| 153 | </label><br> |
---|
[4027] | 154 | <ul><li> |
---|
[4112] | 155 | <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'ec_new_user_name'|@translate}<br> |
---|
[4179] | 156 | <input type = "text" name = "login" id = "ec_in_up_usr_txt_id" maxlength = "50" |
---|
[4157] | 157 | size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();" |
---|
[4027] | 158 | /> |
---|
| 159 | </label> |
---|
[4112] | 160 | <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'ec_new_user_pswd'|@translate}<br> |
---|
[4179] | 161 | <input type = "text" name = "password" id = "ec_in_up_psd_txt_id" maxlength = "32" |
---|
[4112] | 162 | size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();" |
---|
[4027] | 163 | /> |
---|
| 164 | </label> |
---|
[4158] | 165 | <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'ec_confirm_pswd'|@translate}<br> |
---|
| 166 | <input type = "password" id = "ec_confirm_psd_txt_id" maxlength = "32" size = "20"/> |
---|
| 167 | </label> |
---|
[4157] | 168 | <label class = "ec_block" onclick = "ec_check_grp_text(); return ec_mark_user('ec_sel_user_new');" for = "ec_in_up_grp_txt_id"> |
---|
| 169 | <input type = "checkbox" name = "ec_in_up_newgroup" id = "ec_in_up_newgroup_id" |
---|
| 170 | onchange = "ec_selected_old_group = (this.checked != '');" |
---|
| 171 | /> |
---|
| 172 | <span onMouseover = "ec_chk_over_grp = true;" onMouseout = "ec_chk_over_grp = false;"> |
---|
| 173 | {'ec_new_user_group'|@translate} |
---|
| 174 | </span><br> |
---|
[4181] | 175 | <input type = "text" name = "groupname" id = "ec_in_up_grp_txt_id" maxlength = "32" |
---|
[4157] | 176 | size = "20" onblur = "ec_new_grp_text = this.value; if (this.value != '') ec_selected_old_group = true;" |
---|
| 177 | /> |
---|
[4027] | 178 | </label> |
---|
| 179 | </li></ul><br> |
---|
| 180 | </li> |
---|
| 181 | |
---|
| 182 | <li> |
---|
| 183 | {* <!-- Known user --> *} |
---|
[4064] | 184 | <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} > |
---|
[4112] | 185 | <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" /> |
---|
[4027] | 186 | {'ec_up_code_lbl_user_old'|@translate} |
---|
[3999] | 187 | </label> |
---|
[4112] | 188 | <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} > |
---|
[4027] | 189 | {foreach from=$ec_lists.user_ids key=ec_key item=ec_val} |
---|
[4058] | 190 | <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option> |
---|
[4027] | 191 | {/foreach} |
---|
| 192 | </select><br> |
---|
| 193 | </li> |
---|
[3999] | 194 | </td> |
---|
| 195 | </tr> |
---|
| 196 | |
---|
| 197 | {* <!-- Page to display --> *} |
---|
| 198 | <tr> |
---|
[4058] | 199 | <td style = "vertical-align:top;"> |
---|
| 200 | <span style = "font-weight:bold;">{'ec_up_code_lbl_action'|@translate}</span><br> |
---|
| 201 | <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();"> |
---|
[4112] | 202 | <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id"> |
---|
| 203 | <span id = "ec_style_forced_id"> </span> |
---|
[4058] | 204 | </label> |
---|
| 205 | </td> |
---|
[4228] | 206 | |
---|
[3999] | 207 | <td> |
---|
[4228] | 208 | <li> |
---|
| 209 | {* <!-- Index page --> *} |
---|
| 210 | <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');"> |
---|
| 211 | <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" /> |
---|
| 212 | {'ec_up_code_lbl_home'|@translate} |
---|
| 213 | </label> |
---|
| 214 | |
---|
| 215 | {* <!-- Access denied page (only when modifying an entry) --> *} |
---|
| 216 | {if !$ec_is_creation} |
---|
| 217 | <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');"> |
---|
| 218 | <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" /> |
---|
| 219 | {'ec_up_code_lbl_refused'|@translate} |
---|
| 220 | </label> |
---|
| 221 | {/if} |
---|
| 222 | |
---|
| 223 | {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *} |
---|
| 224 | <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');" |
---|
| 225 | {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if} |
---|
| 226 | > |
---|
| 227 | <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" /> |
---|
| 228 | {'ec_up_code_lbl_img'|@translate}<br> |
---|
| 229 | <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6" |
---|
| 230 | size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');" |
---|
| 231 | /> |
---|
| 232 | <span id = "ec_in_up_imgs_warn"></span> |
---|
| 233 | </label> |
---|
| 234 | </li> |
---|
[3999] | 235 | |
---|
[4228] | 236 | <li> |
---|
| 237 | {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *} |
---|
| 238 | <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');" |
---|
| 239 | {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if} |
---|
| 240 | > |
---|
| 241 | <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" /> |
---|
| 242 | {'ec_up_code_lbl_aps'|@translate}<br> |
---|
| 243 | <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" > |
---|
| 244 | {html_options options=$ec_lists.add_pages} |
---|
| 245 | </select> |
---|
[4058] | 246 | </label> |
---|
[4228] | 247 | |
---|
| 248 | {* <!-- Category, provided at least one category is available --> *} |
---|
| 249 | <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');" |
---|
| 250 | {if count($ec_lists.categories) == 0} style = "display:none;" {/if} |
---|
| 251 | > |
---|
| 252 | <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id" |
---|
| 253 | onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;" |
---|
| 254 | /> |
---|
| 255 | <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'ec_up_code_lbl_cats'|@translate}</span><br> |
---|
| 256 | <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;"> |
---|
| 257 | {html_options options=$ec_lists.categories} |
---|
| 258 | </select> |
---|
| 259 | </label> |
---|
| 260 | </li> |
---|
[3999] | 261 | </td> |
---|
| 262 | </tr> |
---|
| 263 | </table> |
---|
| 264 | <p> |
---|
[4019] | 265 | <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/> |
---|
[4112] | 266 | <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();"/> |
---|
[3999] | 267 | </p> |
---|
| 268 | </form> |
---|
| 269 | |
---|
| 270 | {* <!-- JavaScript functions --> *} |
---|
[4002] | 271 | <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script> |
---|
| 272 | <script type = "text/javascript"><!-- |
---|
[4112] | 273 | ec_is_creation = {if $ec_is_creation}true{else}false{/if}; |
---|
| 274 | ec_up_code_lbl_forced_txt = "{'ec_up_code_lbl_forced'|@translate}"; |
---|
| 275 | ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; |
---|
| 276 | ec_JS_message['ec_act_cat_miss'] = "{'ec_act_cat_miss'|@translate|@escape:javascript}"; |
---|
| 277 | ec_JS_message['ec_act_img_miss'] = "{'ec_act_img_miss'|@translate|@escape:javascript}"; |
---|
[4157] | 278 | ec_JS_message['ec_new_pwd_gen1'] = "{'ec_new_pwd_gen1'|@translate|@escape:javascript}"; |
---|
| 279 | ec_JS_message['ec_new_pwd_gen2'] = "{'ec_new_pwd_gen2'|@translate|@escape:javascript}"; |
---|
[4112] | 280 | ec_JS_message['ec_act_entry_miss'] = "{'ec_act_entry_miss'|@translate|@escape:javascript}"; |
---|
[4181] | 281 | ec_JS_message['ec_confirm_force'] = "{'ec_confirm_force'|@translate|@escape:javascript}"; |
---|
[4112] | 282 | ec_JS_message['ec_confirm_del_other'] = "{'ec_confirm_del_other'|@translate|@escape:javascript}"; |
---|
[4157] | 283 | ec_JS_message['ec_user_already_exists'] = "{'ec_user_already_exists'|@translate|@escape:javascript}"; |
---|
| 284 | ec_JS_message['ec_code_already_exists'] = "{'ec_code_already_exists'|@translate|@escape:javascript}"; |
---|
[4158] | 285 | ec_JS_message['ec_conf_pwd_dont_match'] = "{'ec_conf_pwd_dont_match'|@translate|@escape:javascript}"; |
---|
[4181] | 286 | ec_JS_message['ec_confirm_change_user'] = "{'ec_confirm_change_user'|@translate|@escape:javascript}"; |
---|
[4112] | 287 | ec_JS_message['ec_up_code_lbl_home'] = "{'ec_up_code_lbl_home'|@translate}"; |
---|
| 288 | ec_JS_message['ec_submit_code_miss'] = "{'ec_submit_code_miss'|@translate}"; |
---|
| 289 | ec_JS_message['ec_submit_user_miss'] = "{'ec_submit_user_miss'|@translate}"; |
---|
| 290 | ec_JS_message['ec_submit_action_miss'] = "{'ec_submit_action_miss'|@translate}"; |
---|
| 291 | ec_JS_message['ec_submit_code_bad'] = "{'ec_submit_code_bad'|@translate}"; |
---|
| 292 | ec_default_action = "{$ec_default_action}"; |
---|
| 293 | ec_default_entry = "{$ec_default_entry}"; |
---|
| 294 | ec_auto_code_digits_nb = "{$ec_def_auto_code_dg_nb}"; |
---|
| 295 | {if $ec_is_creation} |
---|
| 296 | {foreach from=$ec_lists.duplicable_codes.ids key=ec_key item=ec_val} |
---|
| 297 | ec_duplic_codes[{$ec_key}] = {$ec_val}; |
---|
| 298 | {/foreach} |
---|
| 299 | {/if} |
---|
[4157] | 300 | {foreach from=$ec_lists.ec_table item=ec_val name=listloop} |
---|
| 301 | ec_lists_temp[{$smarty.foreach.listloop.index}] = "{$ec_val.id};{$ec_val.user_id};{$ec_val.action};{$ec_val.arg1};{$ec_val.arg2};{$ec_val.forced}"; |
---|
[4116] | 302 | {/foreach} |
---|
[4157] | 303 | ec_build_ec_lists(); |
---|
[3999] | 304 | ec_init(); |
---|
[4002] | 305 | //--></script> |
---|
[3999] | 306 | |
---|
[4048] | 307 | {include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'} |
---|
[3999] | 308 | |
---|
| 309 | {* <!-- |
---|
| 310 | --> *} |
---|