X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-input-beginning_ending.html;h=be6e03c6f703df0579325e9c6095579af77ec507;hb=5027e0e807b38364fc10c992ea50a2ad7d934986;hp=a8ab6ed10d8d170d3cfc16c59280c470fcf9bf78;hpb=b9dea1e88a8a13a0d206e23ee5c864a0be813030;p=freeside.git
diff --git a/httemplate/elements/tr-input-beginning_ending.html b/httemplate/elements/tr-input-beginning_ending.html
index a8ab6ed10..be6e03c6f 100644
--- a/httemplate/elements/tr-input-beginning_ending.html
+++ b/httemplate/elements/tr-input-beginning_ending.html
@@ -1,53 +1,88 @@
-
-
-
-
-
+% unless ( $m->count == $previous_request_count ) {
+
+
+
+
+% }
- From: |
- MAXLENGTH=<%$maxlength%>> m/d/y<% $time_hint %> |
+ From date: |
+ MAXLENGTH=<%$maxlength%>> m/d/y<% $time_hint %> |
-
+% unless ( $opt{layout} =~ /^h/i ) { #horizontal
+
+
- To: |
- MAXLENGTH=<%$maxlength%>> m/d/y<% $time_hint %> |
+
+% }
+
+ To date: |
+ MAXLENGTH=<%$maxlength%>> m/d/y<% $time_hint %> |
+% unless ( $datesrequired ) {
|
-
+ | >
(leave one or both dates blank for an open-ended search)
|
+% }
+
+<%once>
+my $previous_request_count = '';
+
+%once>
<%init>
+
my %opt = @_;
+
+my $conf = new FS::Conf;
+
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+my $datesrequired = 0;
+$datesrequired = $opt{'datesrequired'} if $opt{'datesrequired'};
+
+my $from = '';
+$from = $opt{'from'} if $opt{'from'};
+my $to = '';
+$to = $opt{'to'} if $opt{'to'};
+
+$opt{prefix} = '' unless defined $opt{prefix};
+$opt{prefix} .= '_' if $opt{prefix};
+
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_format = ' %H:%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>
+<%cleanup>
+
+$previous_request_count = $m->count;
+
+%cleanup>