Ignore:
Timestamp:
Jan 28, 2011, 8:56:39 AM (13 years ago)
Author:
LucMorizur
Message:

Fix bug:2135

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/template/autolog_new.tpl

    r8018 r8956  
    11{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    3 {* <!-- Keeps file coded in UTF-8 without BOM: é --> *}
    4 
    5 {include file = $HeaderIncTPL}
    6 {include file = 'include/datepicker.inc.tpl'}
    7 {include file = $SmartFieldsetIncTPL}
    8 
    9 {* <!-- Specific CSS --> *}
    10 {html_head}
    11   {literal}
    12     <link rel = "stylesheet" type = "text/css" href = "{$RACINE_URL}themes/default/js/ui/theme/ui.datepicker.css">
    13     <style type = "text/css">
    14       #ui-datepicker-div {
    15         display:none;
    16       }
    17     </style>
    18   {/literal}
    19 {/html_head}
    20 
    21 {* <!-- JS functions --> *}
    22 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
     3{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
     4
     5{include file=$HeaderIncTPL}
    236
    247{* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *}
     
    3518      {'Hide'|@translate}
    3619    </label>
    37     &nbsp;&nbsp;
     20    &nbsp;&#151;&nbsp;
    3821  </span>
    3922  {if $ec_ap_ok}
    4023    {'Additional Pages active'|@translate}
    4124    <script type = "text/javascript">
    42       ec_ap_ok = {if count($ec_lists.add_pages) == 0}false{else}true{/if};
     25      var ec_ap_ok = {if count($ec_lists.add_pages) == 0}false{else}true{/if};
    4326    </script>
    4427  {else}
    4528    {'Additional Pages inactive'|@translate}
    4629    <script type = "text/javascript">
    47       ec_ap_ok = false;
     30      var ec_ap_ok = false;
    4831    </script>
    4932  {/if}
    5033</div><span id = "ec_help_ban"></span>
    5134<script type = "text/javascript"><!--
    52   de('ec_help_banner2').style.display = "none";
     35  document.getElementById('ec_help_banner2').style.display = "none";
    5336//--></script>
    5437
    5538{* <!-- Parameters list --> *}
    5639<form class = "filter" method = "post" name = "ec_new_code" action = "" onsubmit = "return ec_check_submit();">
    57   <p style = "display:none;">
    58     <input type = "hidden" id = "ec_act1_id" name = "ec_act1">
    59     <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel">
    60   </p>
     40  <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
     41  <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel" />
    6142 
    6243  {* <!-- Page title. Can be "New entry" or "Entry modification" --> *}
     
    7354    </a>
    7455    {if $ec_is_creation}
    75       <br><br>
    76       <input class = "submit" type = "button" value = "{'Full auto'|@translate}"
     56      <br /><br />
     57      <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'Full auto'|@translate}"
    7758       id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/>
    7859    {/if}
    7960  </div>
    8061 
    81   {* <!-- [ [ [New] / [existing] code] / [Existing entry] ] selection --> *}
    82   <fieldset id = "first_fieldset_id">
     62  {* <!-- [ [New / existing code] / [Existing entry] ] selection --> *}
     63  <fieldset>
    8364    <legend style = "font-weight:bold;">
    8465      {if $ec_is_creation}
     
    8869      {/if}
    8970    </legend>
    90     <ul>
    9171   
    9272      {if $ec_is_creation}
     
    9474          {* <!-- New code (to create) --> *}
    9575          <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code} >
    96             <input type = "radio" name = "ec_sel_code" value = "new" id = "ec_sel_code_new"/>
     76            <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_id" value = "new" id = "ec_sel_code_new"/>
    9777            {'New code'|@translate}
    9878          </label>
    9979          <span {$ec_hidden_when_no_code} >&nbsp;</span>
    10080          <label for = "ec_in_up_code_id" style = "margin:0;">
    101             <input class = "submit" type = "button" value = "{'Auto code button'|@translate}"
     81            <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'Auto code button'|@translate}"
    10282             id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;"
    103            >
     83            />
    10484          </label>
    10585          {'Auto code mid'|@translate}
    10686          <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;">
    107             {foreach from = $ec_auto_code_dg_nb item = ec_item name = listloop}
     87            {foreach from=$ec_auto_code_dg_nb item=ec_item name=listloop}
    10888              <option value = "{$ec_item}">
    10989                {$ec_item}
     
    11797            {/foreach}
    11898          </select>
    119           {'Auto code end'|@translate}<br>
    120         </li>
    121        
    122         <li style = "padding-left: 30px;">
    123           <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
    124            id = "ec_in_up_code_id" onblur = "ec_check_code_text(this.value);"
    125          >
    126           &nbsp;—&nbsp;
    127           <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}">
    128             <span style = "font-weight:bold; font-style:italic;">{'Comment'|@translate}</span>
    129             <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
    130               onchange = "ec_new_comment_text = this.value; ec_update_comment(this.value);"
    131            >
    132           </label>
     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>
    133112        </li>
    134113       
     
    136115          {* <!-- Known code --> *}
    137116          <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}>
    138             <input type = "radio" name = "ec_sel_code" {$ec_hidden_when_no_code} value = "old" id = "ec_sel_code_old">
     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" />
    139118            {'Existing code'|@translate}
    140119          </label>
    141120          <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} >
    142             {foreach from = $ec_lists.duplicable_codes.codes key = ec_key item = ec_val}
     121            {foreach from=$ec_lists.duplicable_codes.codes key=ec_key item=ec_val}
    143122              <option value = "{$ec_val.id}">
    144123                {$ec_key}
    145124                {if $ec_val.comment != ''}
    146                   &nbsp;&nbsp;{$ec_val.comment}
     125                  &nbsp;&#151;&nbsp;{$ec_val.comment}
    147126                {/if}
    148127              </option>
     
    157136          {* <!-- Entry choice --> *}
    158137          <select name = "ec_in_up_entry_list" id = "ec_in_up_entry_list_id" onchange = "ec_mark_entry(this.value);">
    159             {foreach from = $ec_lists.ec_table item = ec_val}
     138            {foreach from=$ec_lists.ec_table item=ec_val}
    160139              <option value = "{$ec_val.id}">
    161140                {$ec_val.id} : {$ec_val.code}
    162141                {if $ec_val.comment != ''}
    163                   &nbsp;&nbsp;{$ec_val.comment}
     142                  &nbsp;&#151;&nbsp;{$ec_val.comment}
    164143                {/if}
    165144              </option>
    166145            {/foreach}
    167146          </select>
    168           &nbsp;&nbsp;
     147          &nbsp;&#151;&nbsp;
    169148            <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}">
    170149              <span style = "font-weight:bold;  font-style:italic;">{'Comment'|@translate}</span>
    171150              <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
    172                onchange = "ec_new_comment_text = this.value;">
     151                onchange = "ec_new_comment_text = this.value;"
     152              />
    173153            </label>
    174154        </li>
     
    176156      {/if}
    177157   
    178     </ul>
    179158  </fieldset>
    180159 
    181160  {* <!-- User to identify --> *}
    182   <fieldset id = "second_fieldset_id">
     161  <fieldset>
    183162    <legend style = "font-weight:bold;">
    184163      {'Identified user'|@translate}
    185164      <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span><br />
    186165    </legend>
    187       <ul>
    188      
    189         {if !$ec_is_creation}
    190           <li>
    191             {* <!-- None --> *}
    192             <label onclick = "return ec_mark_user('ec_sel_user_none');">
    193               <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none">
    194               {'No user'|@translate}
    195             </label><br>
    196           </li>
    197         {/if}
    198        
     166   
     167      {if !$ec_is_creation}
    199168        <li>
    200           {* <!-- New user (to create) --> *}
    201           <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} >
    202             <input type = "radio" name = "ec_sel_user" value = "new" id = "ec_sel_user_new" {$ec_hidden_when_no_user}>
    203             {'New generic user'|@translate}
    204           </label>
    205           <span {$ec_hidden_when_no_user} >&nbsp;</span>
    206           <label for = "ec_in_up_usr_txt_id" style = "margin:0;">
    207             <input class = "submit" type = "button" value = "{'Generate username'|@translate}"
    208              id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
    209            >
    210           </label>
     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 />
    211174        </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>
    212189        <li style = "padding-left: 30px;">
    213           <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br>
     190          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br />
    214191            <input type = "text" name = "login" id = "ec_in_up_usr_txt_id" maxlength = "50"
    215192             size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();"
    216            >
    217           </label>
    218           <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br>
     193            />
     194          </label>
     195          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br />
    219196            <input type = "text" name = "password" id = "ec_in_up_psd_txt_id" maxlength = "32"
    220197             size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();"
    221            >
    222           </label>
    223           <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br>
     198            />
     199          </label>
     200          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br />
    224201            <input type = "password" id = "ec_confirm_psd_txt_id" maxlength = "32" size = "20"/>
    225202          </label>
     
    227204            <input type = "checkbox" name = "ec_in_up_newgroup" id = "ec_in_up_newgroup_id"
    228205             onchange = "ec_selected_old_group = (this.checked != '');"
    229            >
     206            />
    230207            <span onMouseover = "ec_chk_over_grp = true;" onMouseout = "ec_chk_over_grp = false;">
    231208              {'New group'|@translate}
    232             </span><br>
     209            </span><br />
    233210            <input type = "text" name = "groupname" id = "ec_in_up_grp_txt_id" maxlength = "32"
    234211             size = "20" onblur = "ec_new_grp_text = this.value; if (this.value != '') ec_selected_old_group = true;"
    235            >
    236           </label><br>
    237         </li>
    238        
    239         <li>
    240           {* <!-- Known user --> *}
    241           <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} >
    242             <input type = "radio" name = "ec_sel_user" {$ec_hidden_when_no_user} value = "old" id = "ec_sel_user_old">
    243             {'Existing user'|@translate}
    244           </label>
    245           <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} >
    246             {foreach from = $ec_lists.user_ids key = ec_key item = ec_val}
    247               <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option>
    248             {/foreach}
    249           </select><br>
    250         </li>
    251    
    252       </ul>
     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   
    253230  </fieldset>
    254231 
     
    256233  <fieldset>
    257234    <legend style = "font-weight:bold;">{'Displayed page'|@translate}</legend>
    258     <ul>
    259    
    260       <li>
    261         <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();">
    262           <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id">
    263           <span id = "ec_style_forced_id">&nbsp;</span>
     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}
    264291        </label>
    265       </li>
    266      
    267       <li>
    268         {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
    269         <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');"
    270          {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if}
    271         >
    272           <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p">
    273           {'Additional Page'|@translate}<br>
    274           <select class = "categoryList" name = "ec_in_up_aps" size = "30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
    275             {html_options options = $ec_lists.add_pages}
    276           </select>
    277         </label>
    278        
    279         {* <!-- Category, provided at least one category is available --> *}
    280         <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');"
    281          {if count($ec_lists.categories) == 0} style = "display:none;" {/if}
    282         >
    283           <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat"
    284             onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;"
    285          >
    286           <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'Category'|@translate}</span><br>
    287           <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;">
    288             {html_options options = $ec_lists.categories}
    289           </select>
    290         </label>
    291        
    292         {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *}
    293         <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');"
    294          {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if}
    295         >
    296           <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img">
    297           {'Image id'|@translate}<br>
    298           <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6"
    299            size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');"
    300          ><br>
    301           <span id = "ec_in_up_imgs_warn">&nbsp;</span><br>
    302         </label>
    303        
    304         {* <!-- Index page --> *}
    305         <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');">
    306           <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home">
    307           {'Home'|@translate}
    308         </label>
    309        
    310         {* <!-- Access denied page (only when modifying an entry) --> *}
    311         {if !$ec_is_creation}
    312           <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');">
    313             <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused">
    314             {'Access denied'|@translate}
    315           </label>
    316         {/if}
    317       </li>
    318    
    319     </ul>
     292      {/if}
     293    </li>
     294   
    320295  </fieldset>
    321296 
    322   {* <!-- Validity date --> *}
    323  
    324   {*
    325     <!--
    326       Next steps:
    327         _ check if initialize validity date with JS is doable;   DONE
    328         _ check if ' onchange = "ec_update_ts();" ' can be used; DONE
    329         _ implement JS:
    330           _ tick checkboxes when necessary;
    331           _ throw proper information when submitting form.
    332         _ implement PHP ;
    333         _ commit, and drink a pint!
    334       {''|@translate}
    335     -->
    336   *}
    337  
    338   <fieldset>
    339     <legend style = "font-weight:bold;">{'Validity date'|@translate}</legend>
    340     <table style = "margin-left: 0px; text-align:left;">
    341       <tr>
    342        
    343         <td style="vertical-align:top; margin-top:0;">
    344           <p style = "text-align:left; padding-bottom: 1em; padding-top: 0; margin-top: 0pt; font-weight: bold;">
    345             <label for = "ec_valid_date_on_id">
    346               <input type = "checkbox" name = "ec_valid_date_on" id = "ec_valid_date_on_id">
    347               {'Activate'|@translate}
    348             </label>
    349           </p>
    350           <p style = "text-align:left;">
    351             <input type = "text" id = "ec_validity_sel_day" style = "text-align:right; border:none; cursor:default;" disabled = "disabled">&nbsp;
    352             <select id = "ec_validity_day_id" name = "ec_validity_day" class = "ec_valid_ctl ec_datepicker">
    353               <option value = "0">--</option>
    354               {section name=day start=1 loop=32}
    355                 <option value = "{$smarty.section.day.index}">
    356                   {$smarty.section.day.index}
    357                 </option>
    358               {/section}
    359             </select>
    360             <select id = "ec_validity_month_id" name = "ec_validity_month" class = "ec_valid_ctl ec_datepicker">
    361               {html_options options=$month_list}
    362             </select>
    363             <input id = "ec_validity_year_id" name = "ec_validity_year" type = "text" size = "4"
    364              maxlength = "4" style = "text-align:right; " class = "ec_valid_ctl ec_datepicker">
    365             <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" class = "ec_valid_ctl ec_datepicker"
    366              size = "5" maxlength = "5" title = "{'Hours field tooltip'|@translate}" style = "text-align:right; ">
    367             <input id = "ec_linked_date_id" name = "ec_linked_date_id" type = "hidden" size = "10" disabled = "disabled">
    368             <img id = "ec_tmp_img" class = "ui-datepicker-trigger" alt = "" title = ""
    369              src = "{$EVNTCATS_URLS.ROOT}icon/tmp.png" style = "display:none; cursor:default;">
    370           </p>
    371           <p style = "text-align:left;">
    372             <input id = "ec_date_today_btn_id" type = "button" value = "{'Now + 2 mn'|@translate}"
    373              class = "ec_valid_ctl submit" title = "{'Now button tooltip'|@translate}" onclick = "ec_mark_now();">&nbsp;—&nbsp;
    374             <input id = "ec_set_time_to_btn_id" type = "button" value = "{'Set time to'|@translate}"
    375              class = "ec_valid_ctl submit" onclick = "ec_valid_set_time_to(document.getElementById('ec_set_time_to_id').selectedIndex);">&nbsp;
    376             <select id = "ec_set_time_to_id" name = "ec_set_time_to" onchange = "ec_valid_set_time_to(this.selectedIndex);" class = "ec_valid_ctl">
    377               {section name=time start=0 loop=24}
    378                 <option label = "{if strlen($smarty.section.time.index) lt 2}0{/if}{$smarty.section.time.index}:00" value = "{$smarty.section.time.index}">
    379                   {if strlen($smarty.section.time.index) lt 2}0{/if}{$smarty.section.time.index}:00
    380                 </option>
    381               {/section}
    382             </select>
    383           </p>
    384           <p style = "text-align:left;">
    385             <input id = "ec_date_add_btn_id" type = "button" value = "{'Add'|@translate}" title = "{'Add button tooltip'|@translate}" class = "ec_valid_ctl submit"
    386              onclick = "ec_add_time(document.getElementById('ec_date_add_val_id').value, document.getElementById('ec_date_add_kind_id').selectedIndex);">&nbsp;
    387             <input id = "ec_date_add_val_id" type = "text" size = "5" maxlength = "5" value = "" style = "text-align:right;" class = "ec_valid_ctl">&nbsp;
    388             <select id = "ec_date_add_kind_id" name = "ec_date_add_kind" class = "ec_valid_ctl">
    389               <option label = "{'Minutes'|@translate}" value = "minutes">{'Minutes'|@translate}</option>
    390               <option label = "{'Hours'|@translate}"   value = "hours"  >{'Hours'|@translate}</option>
    391               <option label = "{'Days'|@translate}"    value = "days"   >{'Days'|@translate}</option>
    392               <option label = "{'Months'|@translate}"  value = "months" >{'Months'|@translate}</option>
    393               <option label = "{'Years'|@translate}"   value = "years"  >{'Years'|@translate}</option>
    394             </select>
    395           </p>
    396           <br>
    397           <table>
    398             <tr>
    399               <td style = "text-align:right; vertical-align:top; font-weight:bold;">
    400                 <label for = "ec_notify_id" title = "{'Notify label tooltip'|@translate}">
    401                   <input type = "checkbox" name = "ec_notify" id = "ec_notify_id" disabled = "disabled">
    402                   {'Do notify'|@translate}
    403                 </label>
    404               </td>
    405               <td style = "text-align:left;">
    406                 <ul style = "list-style-type:none; list-style-position:inside; padding-left:0.5em;">
    407                   <li style = "margin-bottom:0;">
    408                     <label for = "ec_notify_user_id">
    409                       <input type = "checkbox" name = "ec_notify_user" id = "ec_notify_user_id" class = "ec_valid_ctl">
    410                       {'The user'|@translate}
    411                     </label>
    412                   </li>
    413                   <li style = "margin-bottom:0;">
    414                     <label for = "ec_notify_webm_id">
    415                       <input type = "checkbox" name = "ec_notify_webm" id = "ec_notify_webm_id" class = "ec_valid_ctl">
    416                       {'The webmaster'|@translate}
    417                     </label>
    418                   </li>
    419                   <li style = "margin-bottom:0;">
    420                     <label for = "ec_notify_admins_id">
    421                       <input type = "checkbox" name = "ec_notify_admins" id = "ec_notify_admins_id" class = "ec_valid_ctl">
    422                       {'All administrators'|@translate}
    423                     </label>
    424                   </li>
    425                 </ul>
    426               </td>
    427             </tr>
    428           </table>
    429           <p style = "display:none;">
    430             <!-- jQuery datepicker: see (french) http://fr.piwigo.org/forum/viewtopic.php?id=19042 -->
    431             <select id = "ec_min_day_id" name = "ec_min_day">
    432               <option value = "0">--</option>
    433               {section name=day start=1 loop=32}
    434                 <option value = "{$smarty.section.day.index}">
    435                   {$smarty.section.day.index}
    436                 </option>
    437               {/section}
    438             </select>
    439             <select id = "ec_min_month_id" name = "ec_min_month">
    440               {html_options options=$month_list}
    441             </select>
    442             <input id = "ec_min_year_id" name = "ec_min_year" type = "text" size = "4" maxlength = "4">
    443             <input id = "ec_min_date_id" name = "ec_min_date_id" type = "hidden" disabled = "disabled">
    444             <input id = "ec_valid_offset_id" name = "ec_valid_offset" type = "text">
    445           </p>
    446           {* <!-- For tests purpose; must be removed --> *}
    447           <p style = "text-align:left;">
    448             <span id = "ec_span_tst_id"></span>
    449           </p>
    450           {* <!-- /For tests purpose; must be removed --> *}
    451         </td>
    452        
    453         <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> {* <!-- sorry :-\ --> *}
    454        
    455         <td style="vertical-align:top; margin-top:0;">
    456           <table>
    457             <tr>
    458               <td style = "text-align:right; vertical-align:top; font-weight:bold;">
    459                 {'Page once code outdated'|@translate}
    460               </td>
    461               <td style = "text-align:left;">
    462                 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    463                   <li style = "margin-bottom:0;">
    464                     <label for = "ec_date_unknown_0_id">
    465                       <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id" class = "ec_valid_ctl">
    466                       {'Home'|@translate}
    467                     </label>
    468                   </li>
    469                   <li style = "margin-bottom:0;">
    470                     <label for = "ec_date_unknown_1_id">
    471                       <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id" class = "ec_valid_ctl">
    472                       {'Access denied'|@translate}
    473                     </label>
    474                   </li>
    475                   {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
    476                   <li {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {else} style = "margin-bottom:0;" {/if} >
    477                     <label for = "ec_date_in_up_aps_id">
    478                       <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id" class = "ec_valid_ctl">
    479                       {'Additional Page'|@translate}<br>
    480                       <select class = "ec_valid_ctl categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" >
    481                         {html_options options = $ec_lists.add_pages}
    482                       </select>
    483                     </label>
    484                   </li>
    485                 </ul>
    486               </td>
    487             </tr>
    488           </table>
    489         </td>
    490        
    491       </tr>
    492     </table>
    493    
    494   </fieldset>
    495  
    496  
    497   <p style = "margin-top:0;">
    498     <input class = "submit" type = "submit" value = "{'Submit'|@translate}" style = "margin-top:1em;">
    499     <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();" style = "margin-top:1em;">
     297  <p>
     298    <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/>
     299    <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();"/>
    500300  </p>
    501301</form>
    502302
    503303{* <!-- JavaScript functions --> *}
     304<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
    504305<script type = "text/javascript"><!--
    505306  ec_is_creation                          = {if $ec_is_creation}true{else}false{/if};
    506   ec_validity_on                          = {if $ec_validity_on}true{else}false{/if};
    507307  ec_up_code_lbl_forced_txt               = "{'Forced'|@translate}";
    508308  ec_JS_message['ec_gen_user_act_miss']   = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
     
    525325  ec_default_entry                        = "{$ec_default_entry}";
    526326  ec_auto_code_digits_nb                  = "{$ec_def_auto_code_dg_nb}";
    527   sf_plus_bullet_path                     = "{$EVNTCATS_URLS.ROOT}icon/plus.png";
    528   sf_minus_bullet_path                    = "{$EVNTCATS_URLS.ROOT}icon/minus.png";
    529327  {if $ec_is_creation}
    530     {foreach from = $ec_lists.duplicable_codes.ids key = ec_key item = ec_val}
     328    {foreach from=$ec_lists.duplicable_codes.ids key=ec_key item=ec_val}
    531329      ec_duplic_codes[{$ec_key}] = {$ec_val};
    532330    {/foreach}
    533331  {/if}
    534   {foreach from = $ec_lists.ec_table item = ec_val name = listloop}
     332  {foreach from=$ec_lists.ec_table item=ec_val name=listloop}
    535333    ec_lists_temp[{$smarty.foreach.listloop.index}] =
    536334     "{$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}";
    537335  {/foreach}
    538   {foreach from = $ec_days item = ec_day name = listloop}
    539     ec_validity_days[{$smarty.foreach.listloop.index}] = "{$ec_day}";
    540   {/foreach}
    541336  ec_build_ec_lists();
    542337  ec_init();
    543   //-->
    544 </script>
    545 
    546 {include file = $FooterIncTPL}
     338//--></script>
     339
     340{include file=$FooterIncTPL}
Note: See TracChangeset for help on using the changeset viewer.