Changeset 7661 for extensions/event_cats/admin
- Timestamp:
- Nov 6, 2010, 10:58:50 AM (13 years ago)
- Location:
- extensions/event_cats/admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/admin/autolog_new.inc.php
r7099 r7661 96 96 )); 97 97 98 $month_list = $lang['month']; 99 $month_list[0]='------------'; 100 ksort($month_list); 101 98 102 if ($ec_is_creation) { 99 103 $template->assign('ec_help_banner1', l10n('ec_help_banner1_new_c')); … … 105 109 } 106 110 107 $template->assign('ec_hidden_when_no_code', 108 (count($ec_lists['duplicable_codes']) == 0) ? 'style = "display:none;"' : '' 109 ); 110 $template->assign('ec_hidden_when_no_user', 111 (count($ec_lists['user_ids']) == 0) ? 'style = "display:none;"' : '' 112 ); 113 $template->assign('ec_no_assoc', ((pwg_db_num_rows(pwg_query(" 114 SELECT * 115 FROM `".IMAGE_CATEGORY_TABLE."` 116 "))) == 0)); 117 $template->assign('ec_ap_ok', defined('ADD_PAGES_TABLE')); 118 $template->assign('ec_lists', $ec_lists); 119 $template->assign('ec_default_entry', $ec_default_entry); 120 $template->assign('ec_default_action', $ec_default_action); 121 $template->assign('ec_def_auto_code_dg_nb', $ec_def_auto_code_dg_nb); 122 $template->assign('ec_auto_code_dg_nb', 123 $ec_conf_possible_values['auto_code_dg_nb']); 111 $template->assign(array( 112 'ec_hidden_when_no_code' => (count($ec_lists['duplicable_codes']) == 0) ? 113 'style = "display:none;"' : '', 114 'ec_hidden_when_no_user' => (count($ec_lists['user_ids']) == 0) ? 115 'style = "display:none;"' : '', 116 'ec_no_assoc' => ((pwg_db_num_rows(pwg_query(" 117 SELECT * 118 FROM `".IMAGE_CATEGORY_TABLE."` 119 "))) == 0), 120 'month_list' => $month_list, /* 121 'ec_current_day' => intval(date('j')), 122 'ec_current_month' => intval(date('n')), 123 'ec_current_year' => intval(date('Y')), 124 'ec_server_timestamp' => date('H:i'), */ 125 'ec_ap_ok' => defined('ADD_PAGES_TABLE'), 126 'ec_lists' => $ec_lists, 127 'ec_default_entry' => $ec_default_entry, 128 'ec_default_action' => $ec_default_action, 129 'ec_def_auto_code_dg_nb' => $ec_def_auto_code_dg_nb, 130 'ec_auto_code_dg_nb' => 131 $ec_conf_possible_values['auto_code_dg_nb'], 132 )); 124 133 125 134 ?> -
extensions/event_cats/admin/template/autolog_new.js
r5058 r7661 50 50 var d = document; 51 51 52 /* 53 // Function defined in ./plugins/event_cats/admin/template/autolog_new.tpl 52 54 function de(ec_id) { 53 55 return document.getElementById(ec_id); 54 56 } 57 */ 55 58 56 59 function ec_check_exist_value(ec_id, ec_val) { -
extensions/event_cats/admin/template/autolog_new.tpl
r7287 r7661 6 6 {include file = 'include/datepicker.inc.tpl'} 7 7 8 {html_head} 9 <style type="text/css"> 10 #ui-datepicker-div {ldelim} 11 display:none; 12 } 13 </style> 14 {/html_head} 8 {* <!-- Remove a strange unwanted line at the bottom of the screen --> *} 9 {html_head} {literal} 10 <style type = "text/css"> #ui-datepicker-div { display:none; } </style> 11 {/literal} {/html_head} 15 12 16 13 {* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *} … … 71 68 </div> 72 69 73 {* <!-- [ [ New / existingcode] / [Existing entry] ] selection --> *}70 {* <!-- [ [ [New] / [existing] code] / [Existing entry] ] selection --> *} 74 71 <fieldset> 75 72 <legend style = "font-weight:bold;"> … … 80 77 {/if} 81 78 </legend> 82 83 79 <ul> 80 84 81 {if $ec_is_creation} 85 82 <li> … … 111 108 {'Auto code end'|@translate}<br /> 112 109 </li> 110 113 111 <li style = "padding-left: 30px;"> 114 112 <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40" … … 161 159 <span style = "font-weight:bold; font-style:italic;">{'Comment'|@translate}</span> 162 160 <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id" 163 onchange = "ec_new_comment_text = this.value;" 164 /> 161 onchange = "ec_new_comment_text = this.value;" /> 165 162 </label> 166 163 </li> 167 164 168 165 {/if} 166 169 167 </ul> 170 171 168 </fieldset> 172 169 … … 177 174 <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn"> </span><br /> 178 175 </legend> 176 <ul> 179 177 180 <ul>181 178 {if !$ec_is_creation} 182 179 <li> … … 241 238 </select><br /> 242 239 </li> 240 243 241 </ul> 244 245 242 </fieldset> 246 243 247 244 {* <!-- Page to display --> *} 248 <fieldset style = "float:left;">245 <fieldset> 249 246 <legend style = "font-weight:bold;">{'Displayed page'|@translate}</legend> 250 251 247 <ul> 248 252 249 <li> 253 250 <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();"> … … 308 305 {/if} 309 306 </li> 307 310 308 </ul> 311 312 309 </fieldset> 313 310 314 <fieldset style = "float:right;"> 315 <legend style = "font-weight:bold;">Validité</legend> 316 Date de validité : <br /> 317 <label for = "ec_valid_date_on_off_id"> 318 <input type = "checkbox" name = "ec_valid_date_on_off" id = "ec_valid_date_on_off_id"> 319 Activer 320 </label><br /><br /> 321 <select id = "date_creation_day" name = "date_creation_day"> 322 <option value = "0">--</option> 323 <option value = "1" >1</option> 324 <option value = "2" >2</option> 325 <option value = "3" >3</option> 326 <option value = "4" >4</option> 327 <option value = "5" >5</option> 328 <option value = "6" >6</option> 329 <option value = "7" >7</option> 330 <option value = "8" >8</option> 331 <option value = "9" >9</option> 332 <option value = "10" >10</option> 333 <option value = "11" >11</option> 334 <option value = "12" selected = "selected">12</option> 335 <option value = "13" >13</option> 336 <option value = "14" >14</option> 337 <option value = "15" >15</option> 338 <option value = "16" >16</option> 339 <option value = "17" >17</option> 340 <option value = "18" >18</option> 341 <option value = "19" >19</option> 342 <option value = "20" >20</option> 343 <option value = "21" >21</option> 344 <option value = "22" >22</option> 345 <option value = "23" >23</option> 346 <option value = "24" >24</option> 347 <option value = "25" >25</option> 348 <option value = "26" >26</option> 349 <option value = "27" >27</option> 350 <option value = "28" >28</option> 351 <option value = "29" >29</option> 352 <option value = "30" >30</option> 353 <option value = "31" >31</option> 354 </select> 355 356 <select id = "date_creation_month" name = "date_creation_month"> 357 <option label = "------------" value = "0">------------</option> 358 <option label = "Janvier" value = "1">Janvier</option> 359 <option label = "Février" value = "2">Février</option> 360 <option label = "Mars" value = "3">Mars</option> 361 <option label = "Avril" value = "4">Avril</option> 362 <option label = "Mai" value = "5">Mai</option> 363 <option label = "Juin" value = "6">Juin</option> 364 <option label = "Juillet" value = "7">Juillet</option> 365 <option label = "Août" value = "8">Août</option> 366 <option label = "Septembre" value = "9">Septembre</option> 367 <option label = "Octobre" value = "10" selected = "selected">Octobre</option> 368 <option label = "Novembre" value = "11">Novembre</option> 369 <option label = "Décembre" value = "12">Décembre</option> 370 </select> 371 372 <input id = "date_creation_year" name = "date_creation_year" type = "text" size = "4" maxlength = "4" value = "2010"> 373 {* <!-- date_creation_linked_date représente la date indiquée par les listes déroulantes, et permet de limiter 374 le choix dans la date, en l'occurrence à des dates uniquement postérieures (grâce au 6° paramètre de pwg_initialization_datepicker) --> *} 375 <input id = "date_creation_linked_date" name = "date_creation_linked_date" type = "hidden" size = "10" disabled = "disabled"> 376 <script type = "text/javascript"> 377 pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", 378 "#date_creation_year", "#date_creation_linked_date", null, "#date_creation_linked_date"); 379 </script><br /> 380 <table> 311 {* <!-- Validity date --> *} 312 <fieldset> 313 <legend style = "font-weight:bold;">Date de validité</legend> 314 315 <table style = "margin-left: 0px; text-align:left;"> 381 316 <tr> 382 <td style = "text-align:right; vertical-align:top; font-weight:bold;"> 383 Page à utiliser : 317 <td style="vertical-align:top;"> 318 <p style = "text-align:left; margin-bottom:0.5em;"> 319 <label for = "ec_valid_date_on_id"> 320 <input type = "checkbox" name = "ec_valid_date_on" id = "ec_valid_date_on_id"> 321 Activer 322 </label> 323 </p> 324 <p style = "text-align:left;"> 325 <select id = "ec_validity_day_id" name = "ec_validity_day"> 326 <option value = "0">--</option> 327 {section name=day start=1 loop=32} 328 <option value = "{$smarty.section.day.index}"> 329 {$smarty.section.day.index} 330 </option> 331 {/section} 332 </select> 333 <select id = "ec_validity_month_id" name = "ec_validity_month"> 334 {html_options options=$month_list} 335 </select> 336 <input id = "ec_validity_year_id" name = "ec_validity_year" type = "text" size = "4" maxlength = "4" value = "" /> 337 <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" size = "5" maxlength = "5" value = "" /> 338 339 <script type = "text/javascript"><!-- 340 {literal} 341 function de(ec_id) { 342 return document.getElementById(ec_id); 343 } 344 var maintenant = new Date(); 345 var local_date = maintenant; 346 var m_offset = maintenant.getTimezoneOffset(); 347 local_date.setTime(maintenant.getTime() + m_offset); 348 var mlocal_annee = local_date.getFullYear(); 349 var mlocal_mois = local_date.getMonth() + 1; // In JavaScript, January is 0 and December is 11 350 var mlocal_date = local_date.getDay(); 351 var mlocal_heures = local_date.getHours(); 352 var mlocal_minutes = local_date.getMinutes() + 1; // Validity period cannot be less than one minute 353 de("ec_validity_day_id").selectedIndex = mlocal_date - 1; 354 de("ec_validity_month_id").selectedIndex = mlocal_mois - 1; 355 de("ec_validity_year_id").value = mlocal_annee; 356 de("ec_validity_time_id").value = mlocal_heures + ":" + mlocal_minutes; 357 {/literal} 358 // --> 359 </script> 360 361 {* <!-- ec_linked_date_id représente la date indiquée par les listes déroulantes, et permet de limiter 362 le choix dans la date, en l'occurrence à des dates uniquement postérieures (grâce au 6° paramètre de pwg_initialization_datepicker) --> *} 363 <input id = "ec_linked_date_id" name = "ec_linked_date" type = "hidden" size = "10" disabled = "disabled" /> 364 <script type = "text/javascript"> 365 pwg_initialization_datepicker("#ec_validity_day_id", "#ec_validity_month_id", 366 "#ec_validity_year_id", "#ec_linked_date_id", null, "#ec_linked_date_id"); 367 </script><br /> 368 </p> 384 369 </td> 370 385 371 <td> 386 <label for = "ec_date_unknown_0_id"> 387 <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id" /> 388 {'Home'|@translate} 389 </label><br /> 390 <label for = "ec_date_unknown_1_id"> 391 <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id" /> 392 {'Access denied'|@translate} 393 </label><br /> 394 {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *} 395 <label class = "ec_date_block" for = "ec_date_in_up_aps_id" {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if} > 396 <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id" /> 397 {'Additional Page'|@translate}<br /> 398 <select class = "categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" > 399 {html_options options = $ec_lists.add_pages} 400 </select> 401 </label> 372 <table> 373 <tr> 374 <td style = "text-align:right; vertical-align:top; font-weight:bold; padding-right:1em;"> 375 Page à utiliser après que le code a expiré : 376 </td> 377 <td style = "text-align:left;"> 378 <label for = "ec_date_unknown_0_id"> 379 <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id" /> 380 {'Home'|@translate} 381 </label><br /> 382 <label for = "ec_date_unknown_1_id"> 383 <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id" /> 384 {'Access denied'|@translate} 385 </label><br /> 386 {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *} 387 <label class = "ec_date_block" for = "ec_date_in_up_aps_id" {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if} > 388 <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id" /> 389 {'Additional Page'|@translate}<br /> 390 <select class = "categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" > 391 {html_options options = $ec_lists.add_pages} 392 </select> 393 </label> 394 </td> 395 </tr> 396 </table> 402 397 </td> 398 403 399 </tr> 404 400 </table> 405 401 406 402 </fieldset> 407 403 408 <p style = "clear:both;"> 409 <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/> 410 <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();"/> 404 405 <p style = "margin-top:0;"> 406 <input class = "submit" type = "submit" value = "{'Submit'|@translate}" style = "margin-top:1em;" /> 407 <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();" style = "margin-top:1em;" /> 411 408 </p> 412 409 </form>
Note: See TracChangeset
for help on using the changeset viewer.