[freeside-commits] freeside/httemplate/edit cust_pay.cgi, 1.29, 1.29.2.1 quick-charge.html, 1.17, 1.17.2.1 REAL_cust_pkg.cgi, 1.20.2.2, 1.20.2.3 cust_credit.cgi, 1.24.2.1, 1.24.2.2 cust_refund.cgi, 1.8.4.1, 1.8.4.2
Ivan,,,
ivan at wavetail.420.am
Mon Mar 8 02:57:19 PST 2010
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv29007/httemplate/edit
Modified Files:
Tag: FREESIDE_1_9_BRANCH
cust_pay.cgi quick-charge.html REAL_cust_pkg.cgi
cust_credit.cgi cust_refund.cgi
Log Message:
proper use of date_format config for international date formats, RT#7009
Index: cust_credit.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_credit.cgi,v
retrieving revision 1.24.2.1
retrieving revision 1.24.2.2
diff -u -w -d -r1.24.2.1 -r1.24.2.2
--- cust_credit.cgi 19 Dec 2009 22:41:23 -0000 1.24.2.1
+++ cust_credit.cgi 8 Mar 2010 10:57:17 -0000 1.24.2.2
@@ -14,7 +14,7 @@
<TR>
<TD ALIGN="right">Date</TD>
- <TD BGCOLOR="#ffffff"><% time2str("%D",$_date) %></TD>
+ <TD BGCOLOR="#ffffff"><% time2str($date_format, $_date) %></TD>
</TR>
<TR>
@@ -64,12 +64,10 @@
</FORM>
</BODY>
</HTML>
-<%once>
+<%init>
my $conf = new FS::Conf;
-
-</%once>
-<%init>
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Post credit');
Index: cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_pay.cgi,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -w -d -r1.29 -r1.29.2.1
--- cust_pay.cgi 30 Jul 2009 06:50:29 -0000 1.29
+++ cust_pay.cgi 8 Mar 2010 10:57:17 -0000 1.29.2.1
@@ -26,7 +26,7 @@
<TR>
<TD ALIGN="right">Date</TD>
<TD COLSPAN=2>
- <INPUT TYPE="text" NAME="_date" ID="_date_text" VALUE="<% time2str("%m/%d/%Y %r",$_date) %>">
+ <INPUT TYPE="text" NAME="_date" ID="_date_text" VALUE="<% time2str($date_format.' %r',$_date) %>">
<IMG SRC="../images/calendar.png" ID="_date_button" STYLE="cursor: pointer" TITLE="Select date">
</TD>
</TR>
@@ -34,7 +34,7 @@
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "_date_text",
- ifFormat: "%m/%d/%Y",
+ ifFormat: "<% $date_format %>",
button: "_date_button",
align: "BR"
});
@@ -101,6 +101,7 @@
my $conf = new FS::Conf;
my $money_char = $conf->config('money_char') || '$';
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Post payment');
Index: cust_refund.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_refund.cgi,v
retrieving revision 1.8.4.1
retrieving revision 1.8.4.2
diff -u -w -d -r1.8.4.1 -r1.8.4.2
--- cust_refund.cgi 27 Feb 2010 03:15:32 -0000 1.8.4.1
+++ cust_refund.cgi 8 Mar 2010 10:57:17 -0000 1.8.4.2
@@ -41,7 +41,7 @@
</TR>
<TR>
- <TD ALIGN="right">Date</TD><TD BGCOLOR="#ffffff"><% time2str("%D",$cust_pay->_date) %></TD>
+ <TD ALIGN="right">Date</TD><TD BGCOLOR="#ffffff"><% time2str($date_format, $cust_pay->_date) %></TD>
</TR>
<TR>
@@ -93,7 +93,7 @@
<TR>
<TD ALIGN="right">Date</TD>
- <TD BGCOLOR="#ffffff"><% time2str("%D",$_date) %></TD>
+ <TD BGCOLOR="#ffffff"><% time2str($date_format, $_date) %></TD>
</TR>
<TR>
@@ -134,6 +134,8 @@
unless $FS::CurrentUser::CurrentUser->access_right('Refund payment');
my $conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
my $custnum = $cgi->param('custnum');
my $refund = $cgi->param('refund');
my $payby = $cgi->param('payby');
Index: quick-charge.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/quick-charge.html,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -w -d -r1.17 -r1.17.2.1
--- quick-charge.html 10 Oct 2009 00:00:32 -0000 1.17
+++ quick-charge.html 8 Mar 2010 10:57:17 -0000 1.17.2.1
@@ -147,7 +147,7 @@
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "start_date_text",
- ifFormat: "%m/%d/%Y",
+ ifFormat: "<% $date_format %>",
button: "start_date_button",
align: "BR"
});
@@ -250,6 +250,7 @@
unless $FS::CurrentUser::CurrentUser->access_right('One-time charge');
my $conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
$cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum';
my $custnum = $1;
Index: REAL_cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/REAL_cust_pkg.cgi,v
retrieving revision 1.20.2.2
retrieving revision 1.20.2.3
diff -u -w -d -r1.20.2.2 -r1.20.2.3
--- REAL_cust_pkg.cgi 30 Nov 2009 00:06:38 -0000 1.20.2.2
+++ REAL_cust_pkg.cgi 8 Mar 2010 10:57:17 -0000 1.20.2.3
@@ -94,7 +94,7 @@
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "<% $column %>_text",
- ifFormat: "%m/%d/%Y",
+ ifFormat: "<% $date_format %>",
button: "<% $column %>_button",
align: "BR"
});
@@ -129,20 +129,16 @@
<% include('/elements/footer.html') %>
-<%once>
-
-#my $format = "%c %z (%Z)";
-my $format = "%m/%d/%Y %T %z (%Z)";
-
-#false laziness w/view/cust_main/packages.html
-#my( $billed_or_prepaid,
-
-</%once>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Edit customer package dates');
+my $conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
+my $format = $date_format. ' %T %z (%Z)';
+
my $error = '';
my( $pkgnum, $cust_pkg );
More information about the freeside-commits
mailing list