]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 608375: The calendar widget is not available in the Time Summary page
authorGuy Pyrzak <guy.pyrzak@gmail.com>
Tue, 2 Nov 2010 22:54:50 +0000 (23:54 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 2 Nov 2010 22:54:50 +0000 (23:54 +0100)
r=wicked a=mkanat

template/en/default/bug/summarize-time.html.tmpl

index eb5ba7a7718304f1401b85aa45f0ba637e0d7358..21c26e8c8bbdadeb4d18630cc90e4ba210e75c6c 100644 (file)
@@ -32,6 +32,8 @@
     header = header 
     style_urls = ["skins/standard/summarize-time.css"]
     doc_section = "timetracking.html"
+    yui = ['calendar']
+    javascript_urls = [ "js/util.js", "js/field.js" ]
     %]
 
 [% INCLUDE query_form %]
              for="start_date">Period <u>s</u>tarting</label></b>: 
 </td><td colspan="3">
   <input type="text" id="start_date" name="start_date" size="11"
-  align="right" value="[% start_date FILTER html %]" maxlength="10">
+         align="right" value="[% start_date FILTER html %]" maxlength="10"
+         onchange="updateCalendarFromField(this)">
+  <button type="button" class="calendar_button"
+    id="button_calendar_start_date"
+    onclick="showCalendar('start_date')"><span>Calendar</span>
+  </button>
+  <div id="con_calendar_start_date"></div>
   &nbsp;
   <b>and <label accesskey="e" for="end_date"><u>e</u>nding</label></b>: 
   <input type="text" name="end_date" size="11" id="end_date"
-  align="right" value ="[% end_date FILTER html %]" maxlength="10">
+         align="right" value ="[% end_date FILTER html %]" maxlength="10"
+         onchange="updateCalendarFromField(this)">
+  <button type="button" class="calendar_button"
+    id="button_calendar_end_date"
+    onclick="showCalendar('end_date')"><span>Calendar</span>
+  </button>
+  <div id="con_calendar_end_date"></div>
 </td><td align="right">
   <input type="submit" id="summarize" value="Summarize">
 </td></tr>
 </form>
 <script type="text/javascript">
 <!--
-   document.forms['summary'].start_date.focus()
+  createCalendar('start_date');
+  createCalendar('end_date');
+  document.forms['summary'].start_date.focus();
 //--></script>
 <hr noshade size=1>
 [% END %]