X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-input-beginning_ending.html;h=7481c9bb6d51f68f3a8a9cd31825864d070fe9fa;hb=b429a422185206c645c84ec1c3540494d336b943;hp=0060e789116507ddb5ce95a6c73bd8cfde06d13b;hpb=a0a5a11af6648c147a1e68877ac099035c18790a;p=freeside.git
diff --git a/httemplate/elements/tr-input-beginning_ending.html b/httemplate/elements/tr-input-beginning_ending.html
index 0060e7891..7481c9bb6 100644
--- a/httemplate/elements/tr-input-beginning_ending.html
+++ b/httemplate/elements/tr-input-beginning_ending.html
@@ -1,46 +1,75 @@
-
-
-
-
-
+% unless ( $m->count == $previous_request_count ) {
+
+
+
+
+% }
From date: |
- MAXLENGTH=<%$maxlength%>> m/d/y<% $time_hint %> |
+ MAXLENGTH=<%$maxlength%>> m/d/y<% $time_hint %> |
-
+% unless ( $opt{layout} =~ /^h/i ) { #horizontal
+
+
+
+% }
+
To date: |
- MAXLENGTH=<%$maxlength%>> m/d/y<% $time_hint %> |
+ 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'} ) {
@@ -50,4 +79,10 @@ if ( $opt{'input_time'} ) {
$size = 21;
$maxlength = 27;
}
+
%init>
+<%cleanup>
+
+$previous_request_count = $m->count;
+
+%cleanup>