X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-fixed-date.html;h=ef599796de711cb88343b4ca367f8f33ed8cad2d;hp=716e5ceb82a7f63c3649c6acc4cdc60837ffbcd4;hb=7dd8215a91ca6ca4a9988a0108647ada7f2a11d8;hpb=61e2f89c40a50478d12b4818400caff32d20f61a 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);