[freeside-commits] freeside/httemplate/edit cust_pay.cgi, 1.29, 1.30 quick-charge.html, 1.17, 1.18 REAL_cust_pkg.cgi, 1.22, 1.23 cust_credit.cgi, 1.27, 1.28 cust_refund.cgi, 1.9, 1.10
Ivan,,,
ivan at wavetail.420.am
Mon Mar 8 02:57:08 PST 2010
- Previous message: [freeside-commits] freeside/httemplate/misc delay_susp_pkg.html, 1.3, 1.4 cancel_pkg.html, 1.9, 1.10 order_pkg.html, 1.12, 1.13
- Next message: [freeside-commits] freeside/httemplate/elements tr-input-date-field.html, 1.8, 1.9 tr-input-beginning_ending.html, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv28949/httemplate/edit
Modified Files:
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.27
retrieving revision 1.28
diff -u -w -d -r1.27 -r1.28
--- cust_credit.cgi 19 Dec 2009 22:41:23 -0000 1.27
+++ cust_credit.cgi 8 Mar 2010 10:57:06 -0000 1.28
@@ -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.30
diff -u -w -d -r1.29 -r1.30
--- cust_pay.cgi 30 Jul 2009 06:50:29 -0000 1.29
+++ cust_pay.cgi 8 Mar 2010 10:57:06 -0000 1.30
@@ -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.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- cust_refund.cgi 27 Feb 2010 03:15:31 -0000 1.9
+++ cust_refund.cgi 8 Mar 2010 10:57:06 -0000 1.10
@@ -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.18
diff -u -w -d -r1.17 -r1.18
--- quick-charge.html 10 Oct 2009 00:00:32 -0000 1.17
+++ quick-charge.html 8 Mar 2010 10:57:06 -0000 1.18
@@ -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.22
retrieving revision 1.23
diff -u -w -d -r1.22 -r1.23
--- REAL_cust_pkg.cgi 30 Nov 2009 00:06:37 -0000 1.22
+++ REAL_cust_pkg.cgi 8 Mar 2010 10:57:06 -0000 1.23
@@ -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 );
- Previous message: [freeside-commits] freeside/httemplate/misc delay_susp_pkg.html, 1.3, 1.4 cancel_pkg.html, 1.9, 1.10 order_pkg.html, 1.12, 1.13
- Next message: [freeside-commits] freeside/httemplate/elements tr-input-date-field.html, 1.8, 1.9 tr-input-beginning_ending.html, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list