summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-fixed-date.html
diff options
context:
space:
mode:
authorJeremy Davis <jeremyd@freeside.biz>2014-12-05 09:50:06 -0500
committerJeremy Davis <jeremyd@freeside.biz>2014-12-05 09:50:06 -0500
commitb962b3fbfd38f932061329e2872007b3854e8d35 (patch)
tree156c7687c58e6884991682355b6a5d856180a9a7 /httemplate/elements/tr-fixed-date.html
parentc1e0c1dfc3ed2f27d5bfa4edff030a934f62a6d3 (diff)
parent57bdfd4f7e70cab525c9a4bce7f26015517a81ed (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/elements/tr-fixed-date.html')
-rw-r--r--httemplate/elements/tr-fixed-date.html10
1 files changed, 8 insertions, 2 deletions
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);