[freeside-commits] freeside/httemplate/elements tr-input-date-field.html, 1.8, 1.9 tr-input-beginning_ending.html, 1.7, 1.8
Ivan,,,
ivan at wavetail.420.am
Mon Mar 8 02:57:08 PST 2010
- Previous message: [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
- Next message: [freeside-commits] freeside/httemplate/search report_prepaid_income.html, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv28949/httemplate/elements
Modified Files:
tr-input-date-field.html tr-input-beginning_ending.html
Log Message:
proper use of date_format config for international date formats, RT#7009
Index: tr-input-beginning_ending.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-input-beginning_ending.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- tr-input-beginning_ending.html 5 Oct 2007 19:45:03 -0000 1.7
+++ tr-input-beginning_ending.html 8 Mar 2010 10:57:06 -0000 1.8
@@ -11,7 +11,7 @@
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "<% $opt{prefix} %>beginning_text",
- ifFormat: "%m/%d/%Y<% $time_format %>",
+ ifFormat: "<% $date_format. $time_format %>",
button: "<% $opt{prefix} %>beginning_button",
align: "BR"
<% $input_time %>
@@ -30,7 +30,7 @@
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "<% $opt{prefix} %>ending_text",
- ifFormat: "%m/%d/%Y<% $time_format %>",
+ ifFormat: "<% $date_format. $time_format %>",
button: "<% $opt{prefix} %>ending_button",
align: "BR"
<% $input_time %>
@@ -54,6 +54,10 @@
my %opt = @_;
+my $conf = new FS::Conf;
+
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
$opt{prefix} = '' unless defined $opt{prefix};
$opt{prefix} .= '_' if $opt{prefix};
Index: tr-input-date-field.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-input-date-field.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- tr-input-date-field.html 7 Aug 2009 23:08:03 -0000 1.8
+++ tr-input-date-field.html 8 Mar 2010 10:57:06 -0000 1.9
@@ -21,8 +21,8 @@
});
</SCRIPT>
-
<%init>
+
my($name, $value, $label, $format, $usedatetime);
if ( ref($_[0]) ) {
my $opt = shift;
@@ -35,7 +35,10 @@
($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/ ) {
- Previous message: [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
- Next message: [freeside-commits] freeside/httemplate/search report_prepaid_income.html, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list