summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-input-beginning_ending.html
diff options
context:
space:
mode:
authorivan <ivan>2010-03-08 10:57:06 +0000
committerivan <ivan>2010-03-08 10:57:06 +0000
commit06a85a88bfdb0d3fc79ee055eb8327658dfe63ab (patch)
tree239e526d182be4b3a8824811fde923fbd50621f5 /httemplate/elements/tr-input-beginning_ending.html
parent611624bc08f525d19e1bd548a7d005aa73a53145 (diff)
proper use of date_format config for international date formats, RT#7009
Diffstat (limited to 'httemplate/elements/tr-input-beginning_ending.html')
-rw-r--r--httemplate/elements/tr-input-beginning_ending.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/httemplate/elements/tr-input-beginning_ending.html b/httemplate/elements/tr-input-beginning_ending.html
index 8a1dd62a9..2aa597479 100644
--- a/httemplate/elements/tr-input-beginning_ending.html
+++ b/httemplate/elements/tr-input-beginning_ending.html
@@ -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 $previous_request_count = '';
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};