[freeside-commits] freeside/httemplate/elements tr-input-beginning_ending.html, 1.1, 1.2

Ivan,,, ivan at wavetail.420.am
Mon Sep 4 13:06:00 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail:/tmp/cvs-serv29664/elements

Modified Files:
	tr-input-beginning_ending.html 
Log Message:
allow time selection in RADIUS searches and grid-ize the resulting table

Index: tr-input-beginning_ending.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-input-beginning_ending.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- tr-input-beginning_ending.html	22 Dec 2005 04:01:17 -0000	1.1
+++ tr-input-beginning_ending.html	4 Sep 2006 20:05:58 -0000	1.2
@@ -6,26 +6,28 @@
 
 <TR>
   <TD ALIGN="right">From: </TD>
-  <TD><INPUT TYPE="text" NAME="beginning" ID="beginning_text" VALUE="" SIZE=11 MAXLENGTH=10> <IMG SRC="../images/calendar.png" ID="beginning_button" STYLE="cursor: pointer" TITLE="Select date"><BR><i>m/d/y</i></TD>
+  <TD><INPUT TYPE="text" NAME="beginning" ID="beginning_text" VALUE="" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="../images/calendar.png" ID="beginning_button" STYLE="cursor: pointer" TITLE="Select date"><BR><i>m/d/y<% $time_hint %></i></TD>
 <SCRIPT TYPE="text/javascript">
   Calendar.setup({
     inputField: "beginning_text",
-    ifFormat:   "%m/%d/%Y",
+    ifFormat:   "%m/%d/%Y<% $time_format %>",
     button:     "beginning_button",
     align:      "BR"
+    <% $input_time %>
   });
 </SCRIPT>
 </TR>
 
 <TR>
   <TD ALIGN="right">To: </TD>
-  <TD><INPUT TYPE="text" NAME="ending" ID="ending_text" VALUE="" SIZE=11 MAXLENGTH=10> <IMG SRC="../images/calendar.png" ID="ending_button" STYLE="cursor: pointer" TITLE="Select date"><BR><i>m/d/y</i></TD>
+  <TD><INPUT TYPE="text" NAME="ending" ID="ending_text" VALUE="" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="../images/calendar.png" ID="ending_button" STYLE="cursor: pointer" TITLE="Select date"><BR><i>m/d/y<% $time_hint %></i></TD>
 <SCRIPT TYPE="text/javascript">
   Calendar.setup({
     inputField: "ending_text",
-    ifFormat:   "%m/%d/%Y",
+    ifFormat:   "%m/%d/%Y<% $time_format %>",
     button:     "ending_button",
     align:      "BR"
+    <% $input_time %>
   });
 </SCRIPT>
 </TR>
@@ -37,3 +39,15 @@
   </TD>
 </TR>
 
+<%init>
+my %opt = @_;
+my( $input_time, $time_format, $time_hint ) = ( '', '', '' );
+my( $size, $maxlength ) = ( 11, 10 );
+if ( $opt{'input_time'} ) {
+  $input_time  = ', showsTime: true, timeFormat: "12"'; # http://www.dynarch.com/demos/jscalendar/doc/html/reference.html#node_sec_2.3
+  $time_format = ' %k:%M:%S'; # http://www.dynarch.com/demos/jscalendar/doc/html/reference.html#node_sec_5.3.5
+  $time_hint   = ' h:m:s';
+  $size = 21;
+  $maxlength = 27;
+}
+</%init>



More information about the freeside-commits mailing list