Merge branch 'master' of https://github.com/jgoodman/Freeside
[freeside.git] / httemplate / elements / tr-input-date-field.html
index 5400fcb..40162f0 100644 (file)
@@ -1,3 +1,22 @@
+<%doc>
+
+Example:
+
+  <& /elements/tr-input_date-field,
+       {
+          'name'  => 'field_name',
+          'value' => $current_value,
+          'label' => 'Label',
+
+          #optional
+          'format'      => '%m/%d/%Y', #overrides date_format config
+          'usedatetime' => 1, #use DateTime->strftime to format the date
+                              # instead of Date::Format->time2str
+          'noinit'      => 1,          #first one on the page is enough
+       },
+  &>
+
+</%doc>
 % unless ( $noinit ) {
 <LINK REL="stylesheet" TYPE="text/css" HREF="<%$fsurl%>elements/calendar-win2k-2.css" TITLE="win2k-2">
 <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar_stripped.js"></SCRIPT>
@@ -9,7 +28,7 @@
   <TD ALIGN="right"><% $label %></TD>
   <TD>
     <INPUT TYPE="text" NAME="<% $name %>" ID="<% $name %>_text" VALUE="<% $value %>">
-    <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $name  %>_button" STYLE="cursor: pointer" TITLE="Select date">
+    <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $name  %>_button" STYLE="cursor: pointer" TITLE="<% mt('Select date') |h %>">
   </TD>
 </TR>