X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-from_to.html;h=083243d403ef6ea01e3383901c85933410481151;hp=d7e5a8337d0541c5afc628028f2805b9af3b64d7;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hpb=15e561850b61b10a92a46d8f3e316d53d4970087 diff --git a/httemplate/elements/tr-select-from_to.html b/httemplate/elements/tr-select-from_to.html index d7e5a8337..083243d40 100644 --- a/httemplate/elements/tr-select-from_to.html +++ b/httemplate/elements/tr-select-from_to.html @@ -1,33 +1,34 @@ -<% +% +% +% #my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); +% my ($curmon,$curyear) = (localtime(time))[4,5]; +% +% #find first month +% my $syear = 1899+$curyear; +% my $smonth = $curmon+1; +% +% #want 12 month by default, not 13 +% $smonth++; +% if ( $smonth > 12 ) { $smonth-=12; $syear++ } +% +% #find last month +% my $eyear = 1900+$curyear; +% my $emonth = $curmon+1; +% +% my %hash = ( +% 'show_month_abbr' => 1, +% 'start_year' => '1999', +% 'end_year' => '2012', #haha, well... +% @_, +% ); +% +% - #my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); - my ($curmon,$curyear) = (localtime(time))[4,5]; - - #find first month - my $syear = 1899+$curyear; - my $smonth = $curmon+1; - - #want 12 month by default, not 13 - $smonth++; - if ( $smonth > 12 ) { $smonth-=12; $syear++ } - - #find last month - my $eyear = 1900+$curyear; - my $emonth = $curmon+1; - - my %hash = ( - 'show_month_abbr' => 1, - 'start_year' => '1999', - 'end_year' => '2012', #haha, well... - @_, - ); - -%> From: - <%= include('/elements/select-month_year.html', + <% include('/elements/select-month_year.html', 'prefix' => 'start', 'selected_mon' => $smonth, 'selected_year' => $syear, @@ -40,7 +41,7 @@ To: - <%= include('/elements/select-month_year.html', + <% include('/elements/select-month_year.html', 'prefix' => 'end', 'selected_mon' => $emonth, 'selected_year' => $eyear,