X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-fixed-date.html;h=ef599796de711cb88343b4ca367f8f33ed8cad2d;hb=796780078517c26803a7689ccd80931381de23ea;hp=716e5ceb82a7f63c3649c6acc4cdc60837ffbcd4;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/httemplate/elements/tr-fixed-date.html b/httemplate/elements/tr-fixed-date.html index 716e5ceb8..ef599796d 100644 --- a/httemplate/elements/tr-fixed-date.html +++ b/httemplate/elements/tr-fixed-date.html @@ -1,12 +1,18 @@ <% include('tr-fixed.html', %opt ) %> <%init> -my %opt = @_; +my %opt; +if ( ref($_[0]) ) { + my $hashref = shift; + %opt = %$hashref; +} else { + %opt = @_; +} my $value = $opt{'curr_value'} || $opt{'value'}; my $conf = new FS::Conf; -my $date_format = $conf->config('date_format') || '%m/%d/%Y'; +my $date_format = $opt{'format'} || $conf->config('date_format') || '%m/%d/%Y'; $opt{'formatted_value'} = time2str($date_format, $value);