proper use of date_format config for international date formats, RT#7009
[freeside.git] / httemplate / misc / cancel_pkg.html
index 607ce13..67d2847 100755 (executable)
@@ -31,7 +31,7 @@
 <SCRIPT TYPE="text/javascript">
   Calendar.setup({
     inputField: "expire_date",
-    ifFormat:   "%m/%d/%Y",
+    ifFormat:   "<% $date_format %>",
     button:     "expire_button",
     align:      "BR"
   });
 
 <%init>
 
-my $date = time2str("%m/%d/%Y", time);
+my %conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
+my $date = time2str($date_format, time);
 
 my($pkgnum, $reasonnum);
 if ( $cgi->param('error') ) {