Ignore:
Timestamp:
Nov 23, 2010, 12:58:57 AM (13 years ago)
Author:
LucMorizur
Message:

Finalize date & time controls -- with some jQuery code!

File:
1 edited

Legend:

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

    r7835 r7847  
    88{* <!-- Remove a strange unwanted line at the bottom of the screen --> *}
    99{html_head} {literal}
     10  <link rel = "stylesheet" type = "text/css" href = "{$RACINE_URL}themes/default/js/ui/theme/ui.datepicker.css">
    1011  <style type = "text/css"> #ui-datepicker-div { display:none; } </style>
    1112{/literal} {/html_head}
     
    329330       
    330331        <td style="vertical-align:top; margin-top:0;">
    331           <p style = "text-align: left; padding-bottom: 1em; padding-top: 0; margin-top: 0pt; font-weight: bold;">
     332          <p style = "text-align:left; padding-bottom: 1em; padding-top: 0; margin-top: 0pt; font-weight: bold;">
    332333            <label for = "ec_valid_date_on_id">
    333334              <input type = "checkbox" name = "ec_valid_date_on" id = "ec_valid_date_on_id">
     
    337338          <p style = "text-align:left;">
    338339            <input id = "ec_date_today_btn_id" type = "button" value = "{'Now + 2 mn'|@translate}"
    339              class = "submit" title = "{'Now button tooltip'|@translate}" onclick = "">
     340             class = "submit" title = "{'Now button tooltip'|@translate}" onclick = "ec_mark_now();">&nbsp;—&nbsp;
     341            <input id = "ec_set_time_to_btn_id" type = "button" value = "{'Set time to'|@translate}"
     342             class = "submit" onclick = "ec_valid_set_time_to(document.getElementById('ec_set_time_to_id').selectedIndex);">&nbsp;
     343            <select id = "ec_set_time_to_id" name = "ec_set_time_to" onchange = "ec_valid_set_time_to(this.selectedIndex);">
     344              {section name=time start=0 loop=24}
     345                <option label = "{if strlen($smarty.section.time.index) lt 2}0{/if}{$smarty.section.time.index}:00" value = "{$smarty.section.time.index}">
     346                  {if strlen($smarty.section.time.index) lt 2}0{/if}{$smarty.section.time.index}:00
     347                </option>
     348              {/section}
     349            </select>
    340350          </p>
    341351          <p style = "text-align:left;">
    342             <select id = "ec_validity_day_id" name = "ec_validity_day">
     352            <select id = "ec_validity_day_id" name = "ec_validity_day" class = "ec_datepicker">
    343353              <option value = "0">--</option>
    344354              {section name=day start=1 loop=32}
     
    348358              {/section}
    349359            </select>
    350             <select id = "ec_validity_month_id" name = "ec_validity_month">
     360            <select id = "ec_validity_month_id" name = "ec_validity_month" class = "ec_datepicker">
    351361              {html_options options=$month_list}
    352362            </select>
    353             <input id = "ec_validity_year_id" name = "ec_validity_year" type = "text" size = "4" maxlength = "4">
    354             <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" size = "5" maxlength = "5" title = "{'Hours field tooltip'|@translate}">
     363            <input id = "ec_validity_year_id" name = "ec_validity_year" type = "text" size = "4" maxlength = "4" style = "text-align:right;" class = "ec_datepicker">
     364            <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" class = "ec_datepicker"
     365             size = "5" maxlength = "5" title = "{'Hours field tooltip'|@translate}" style = "text-align:right;">
    355366            <input id = "ec_linked_date_id" name = "ec_linked_date_id" type = "hidden" size = "10" disabled = "disabled">
    356367          </p>
     
    358369            <input id = "ec_date_add_btn_id" type = "button" value = "{'Add'|@translate}" title = "{'Add button tooltip'|@translate}" class = "submit"
    359370             onclick = "ec_add_time(document.getElementById('ec_date_add_val_id').value, document.getElementById('ec_date_add_kind_id').selectedIndex);">&nbsp;
    360             <input id = "ec_date_add_val_id" type = "text" size = "5" maxlength = "5" value = "">&nbsp;
     371            <input id = "ec_date_add_val_id" type = "text" size = "5" maxlength = "5" value = "" style = "text-align:right;">&nbsp;
    361372            <select id = "ec_date_add_kind_id" name = "ec_date_add_kind">
    362373              <option label = "{'Minutes'|@translate}" value = "minutes">{'Minutes'|@translate}</option>
     
    367378            </select>
    368379          </p>
    369           <p>
    370             <table>
    371               <tr>
    372                 <td style = "text-align:right; vertical-align:top; font-weight:bold;">
    373                   <label for = "ec_notify_id" title = "{'Notify label tooltip'|@translate}">
    374                     <input type = "checkbox" name = "ec_notify" id = "ec_notify_id" disabled = "disabled">
    375                     {'Do notify'|@translate}
    376                   </label>
    377                 </td>
    378                 <td style = "text-align:left;">
    379                   <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    380                     <li style = "margin-bottom:0;">
    381                       <label for = "ec_notify_user_id">
    382                         <input type = "checkbox" name = "ec_notify_user" id = "ec_notify_user_id">
    383                         {'The user'|@translate}
    384                       </label>
    385                     </li>
    386                     <li style = "margin-bottom:0;">
    387                       <label for = "ec_notify_webm_id">
    388                         <input type = "checkbox" name = "ec_notify_webm" id = "ec_notify_webm_id">
    389                         {'The webmaster'|@translate}
    390                       </label>
    391                     </li>
    392                     <li style = "margin-bottom:0;">
    393                       <label for = "ec_notify_admins_id">
    394                         <input type = "checkbox" name = "ec_notify_admins" id = "ec_notify_admins_id">
    395                         {'All administrators'|@translate}
    396                       </label>
    397                     </li>
    398                   </ul>
    399                 </td>
    400               </tr>
    401             </table>
    402           </p>
     380          <br>
     381          <table>
     382            <tr>
     383              <td style = "text-align:right; vertical-align:top; font-weight:bold;">
     384                <label for = "ec_notify_id" title = "{'Notify label tooltip'|@translate}">
     385                  <input type = "checkbox" name = "ec_notify" id = "ec_notify_id" disabled = "disabled">
     386                  {'Do notify'|@translate}
     387                </label>
     388              </td>
     389              <td style = "text-align:left;">
     390                <ul style = "list-style-type:none; list-style-position:inside; padding-left:0.5em;">
     391                  <li style = "margin-bottom:0;">
     392                    <label for = "ec_notify_user_id">
     393                      <input type = "checkbox" name = "ec_notify_user" id = "ec_notify_user_id">
     394                      {'The user'|@translate}
     395                    </label>
     396                  </li>
     397                  <li style = "margin-bottom:0;">
     398                    <label for = "ec_notify_webm_id">
     399                      <input type = "checkbox" name = "ec_notify_webm" id = "ec_notify_webm_id">
     400                      {'The webmaster'|@translate}
     401                    </label>
     402                  </li>
     403                  <li style = "margin-bottom:0;">
     404                    <label for = "ec_notify_admins_id">
     405                      <input type = "checkbox" name = "ec_notify_admins" id = "ec_notify_admins_id">
     406                      {'All administrators'|@translate}
     407                    </label>
     408                  </li>
     409                </ul>
     410              </td>
     411            </tr>
     412          </table>
    403413          <p style = "display:none;">
    404414            <!-- jQuery datepicker: see (french) http://fr.piwigo.org/forum/viewtopic.php?id=19042 -->
     
    415425            </select>
    416426            <input id = "ec_min_year_id" name = "ec_min_year" type = "text" size = "4" maxlength = "4">
    417             <input id = "ec_min_date_id" name = "ec_min_date_id" type = "hidden" size = "10" disabled = "disabled">
     427            <input id = "ec_min_date_id" name = "ec_min_date_id" type = "hidden" disabled = "disabled">
     428            <input id = "ec_valid_offset_id" name = "ec_valid_offset" type = "text">
    418429          </p>
    419430          {* <!-- For tests purpose; must be removed --> *}
Note: See TracChangeset for help on using the changeset viewer.