Index: extensions/event_cats/admin/template/autolog_new.tpl
===================================================================
--- extensions/event_cats/admin/template/autolog_new.tpl	(revision 7864)
+++ extensions/event_cats/admin/template/autolog_new.tpl	(revision 7879)
@@ -315,7 +315,9 @@
     <!--
       Next steps:
-        _ check if initialize validity date with JS is doable ;   DONE
-        _ check if ' onchange = "ec_update_ts();" ' can be used ; DONE
-        _ implement JS ; DONE
+        _ check if initialize validity date with JS is doable;   DONE
+        _ check if ' onchange = "ec_update_ts();" ' can be used; DONE
+        _ implement JS:
+          _ tick checkboxes when necessary;
+          _ throw proper information when submitting form.
         _ implement PHP ;
         _ commit, and drink a pint!
@@ -336,7 +338,7 @@
             </label>
           </p>
-          <p style = "text-align:left;{* padding:0.5em; border:1px solid #666666; *}">
-            <input type = "text" id = "ec_validity_sel_day" style = "text-align:right; border:none;" disabled = "disabled">&nbsp;
-            <select id = "ec_validity_day_id" name = "ec_validity_day" class = "ec_datepicker">
+          <p style = "text-align:left;">
+            <input type = "text" id = "ec_validity_sel_day" style = "text-align:right; border:none; cursor:default;" disabled = "disabled">&nbsp;
+            <select id = "ec_validity_day_id" name = "ec_validity_day" class = "ec_valid_ctl ec_datepicker">
               <option value = "0">--</option>
               {section name=day start=1 loop=32}
@@ -346,19 +348,20 @@
               {/section}
             </select>
-            <select id = "ec_validity_month_id" name = "ec_validity_month" class = "ec_datepicker">
+            <select id = "ec_validity_month_id" name = "ec_validity_month" class = "ec_valid_ctl ec_datepicker">
               {html_options options=$month_list}
             </select>
             <input id = "ec_validity_year_id" name = "ec_validity_year" type = "text" size = "4"
-             maxlength = "4" style = "text-align:right; " class = "ec_datepicker">
-            <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" class = "ec_datepicker"
+             maxlength = "4" style = "text-align:right; " class = "ec_valid_ctl ec_datepicker">
+            <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" class = "ec_valid_ctl ec_datepicker"
              size = "5" maxlength = "5" title = "{'Hours field tooltip'|@translate}" style = "text-align:right; ">
             <input id = "ec_linked_date_id" name = "ec_linked_date_id" type = "hidden" size = "10" disabled = "disabled">
+            <img id = "ec_tmp_img" class = "ui-datepicker-trigger" src = "{$EVNTCATS_URLS.ROOT}icon/tmp.png" alt = "" title = "" style = "display:none;">
           </p>
           <p style = "text-align:left;">
             <input id = "ec_date_today_btn_id" type = "button" value = "{'Now + 2 mn'|@translate}"
-             class = "submit" title = "{'Now button tooltip'|@translate}" onclick = "ec_mark_now();">&nbsp;—&nbsp;
+             class = "ec_valid_ctl submit" title = "{'Now button tooltip'|@translate}" onclick = "ec_mark_now();">&nbsp;—&nbsp;
             <input id = "ec_set_time_to_btn_id" type = "button" value = "{'Set time to'|@translate}"
-             class = "submit" onclick = "ec_valid_set_time_to(document.getElementById('ec_set_time_to_id').selectedIndex);">&nbsp;
-            <select id = "ec_set_time_to_id" name = "ec_set_time_to" onchange = "ec_valid_set_time_to(this.selectedIndex);">
+             class = "ec_valid_ctl submit" onclick = "ec_valid_set_time_to(document.getElementById('ec_set_time_to_id').selectedIndex);">&nbsp;
+            <select id = "ec_set_time_to_id" name = "ec_set_time_to" onchange = "ec_valid_set_time_to(this.selectedIndex);" class = "ec_valid_ctl">
               {section name=time start=0 loop=24}
                 <option label = "{if strlen($smarty.section.time.index) lt 2}0{/if}{$smarty.section.time.index}:00" value = "{$smarty.section.time.index}">
@@ -369,8 +372,8 @@
           </p>
           <p style = "text-align:left;">
-            <input id = "ec_date_add_btn_id" type = "button" value = "{'Add'|@translate}" title = "{'Add button tooltip'|@translate}" class = "submit"
+            <input id = "ec_date_add_btn_id" type = "button" value = "{'Add'|@translate}" title = "{'Add button tooltip'|@translate}" class = "ec_valid_ctl submit"
              onclick = "ec_add_time(document.getElementById('ec_date_add_val_id').value, document.getElementById('ec_date_add_kind_id').selectedIndex);">&nbsp;
-            <input id = "ec_date_add_val_id" type = "text" size = "5" maxlength = "5" value = "" style = "text-align:right;">&nbsp;
-            <select id = "ec_date_add_kind_id" name = "ec_date_add_kind">
+            <input id = "ec_date_add_val_id" type = "text" size = "5" maxlength = "5" value = "" style = "text-align:right;" class = "ec_valid_ctl">&nbsp;
+            <select id = "ec_date_add_kind_id" name = "ec_date_add_kind" class = "ec_valid_ctl">
               <option label = "{'Minutes'|@translate}" value = "minutes">{'Minutes'|@translate}</option>
               <option label = "{'Hours'|@translate}"   value = "hours"  >{'Hours'|@translate}</option>
@@ -393,5 +396,5 @@
                   <li style = "margin-bottom:0;">
                     <label for = "ec_notify_user_id">
-                      <input type = "checkbox" name = "ec_notify_user" id = "ec_notify_user_id">
+                      <input type = "checkbox" name = "ec_notify_user" id = "ec_notify_user_id" class = "ec_valid_ctl">
                       {'The user'|@translate}
                     </label>
@@ -399,5 +402,5 @@
                   <li style = "margin-bottom:0;">
                     <label for = "ec_notify_webm_id">
-                      <input type = "checkbox" name = "ec_notify_webm" id = "ec_notify_webm_id">
+                      <input type = "checkbox" name = "ec_notify_webm" id = "ec_notify_webm_id" class = "ec_valid_ctl">
                       {'The webmaster'|@translate}
                     </label>
@@ -405,5 +408,5 @@
                   <li style = "margin-bottom:0;">
                     <label for = "ec_notify_admins_id">
-                      <input type = "checkbox" name = "ec_notify_admins" id = "ec_notify_admins_id">
+                      <input type = "checkbox" name = "ec_notify_admins" id = "ec_notify_admins_id" class = "ec_valid_ctl">
                       {'All administrators'|@translate}
                     </label>
@@ -449,5 +452,5 @@
                   <li style = "margin-bottom:0;">
                     <label for = "ec_date_unknown_0_id">
-                      <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id">
+                      <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id" class = "ec_valid_ctl">
                       {'Home'|@translate}
                     </label>
@@ -455,5 +458,5 @@
                   <li style = "margin-bottom:0;">
                     <label for = "ec_date_unknown_1_id">
-                      <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id">
+                      <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id" class = "ec_valid_ctl">
                       {'Access denied'|@translate}
                     </label>
@@ -461,8 +464,8 @@
                   {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
                   <li {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {else} style = "margin-bottom:0;" {/if} >
-                    <label class = "ec_date_block" for = "ec_date_in_up_aps_id">
-                      <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id">
+                    <label for = "ec_date_in_up_aps_id">
+                      <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id" class = "ec_valid_ctl">
                       {'Additional Page'|@translate}<br>
-                      <select class = "categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" >
+                      <select class = "ec_valid_ctl categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" >
                         {html_options options = $ec_lists.add_pages}
                       </select>
