From 06a85a88bfdb0d3fc79ee055eb8327658dfe63ab Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 8 Mar 2010 10:57:06 +0000 Subject: proper use of date_format config for international date formats, RT#7009 --- httemplate/edit/REAL_cust_pkg.cgi | 16 ++++++---------- httemplate/edit/cust_credit.cgi | 8 +++----- httemplate/edit/cust_pay.cgi | 7 ++++--- httemplate/edit/cust_refund.cgi | 6 ++++-- httemplate/edit/elements/ApplicationCommon.html | 7 ++++--- httemplate/edit/quick-charge.html | 3 ++- httemplate/elements/tr-input-beginning_ending.html | 8 ++++++-- httemplate/elements/tr-input-date-field.html | 7 +++++-- httemplate/misc/cancel_pkg.html | 7 +++++-- httemplate/misc/delay_susp_pkg.html | 7 +++++-- httemplate/misc/order_pkg.html | 3 ++- httemplate/search/report_prepaid_income.html | 5 ++++- httemplate/view/cust_main/payment_history.html | 9 +++++---- httemplate/view/cust_main/payment_history/credit.html | 8 +++++--- httemplate/view/cust_main/payment_history/payment.html | 8 +++++--- .../view/cust_main/payment_history/voided_payment.html | 4 +++- 16 files changed, 68 insertions(+), 45 deletions(-) (limited to 'httemplate') diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi index c31213805..18d4415c6 100755 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ b/httemplate/edit/REAL_cust_pkg.cgi @@ -94,7 +94,7 @@ - <%init> + my($name, $value, $label, $format, $usedatetime); if ( ref($_[0]) ) { my $opt = shift; @@ -35,7 +35,10 @@ if ( ref($_[0]) ) { ($name, $value, $label, $format, $usedatetime) = @_; } -$format = "%m/%d/%Y" unless $format; +my $conf = new FS::Conf; + +$format ||= $conf->config('date_format') || '%m/%d/%Y'; + $label = $name unless $label; if ( $value =~ /\S/ ) { diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html index 607ce13c4..67d2847cc 100755 --- a/httemplate/misc/cancel_pkg.html +++ b/httemplate/misc/cancel_pkg.html @@ -31,7 +31,7 @@