fix for #1430 (subscription add fails)
authorPaul POULAIN <paul@koha-fr.org>
Tue, 2 Oct 2007 20:30:06 +0000 (22:30 +0200)
committerChris Cormack <crc@liblime.com>
Tue, 2 Oct 2007 20:45:54 +0000 (15:45 -0500)
due to us date format not properly set

Signed-off-by: Chris Cormack <crc@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl
serials/subscription-add.pl

index ba6d120..bd277bd 100644 (file)
@@ -895,7 +895,7 @@ window.onload = irregular_order();
                 <script type="text/javascript">
                     Calendar.setup({
                         inputField:"acqui_date",
-                        ifFormat       :   "%d/%m/%Y",
+                        ifFormat       :   "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
                         button         :   "button2",
                         align          :   "Tl"
                     });
@@ -903,7 +903,7 @@ window.onload = irregular_order();
                 <script type="text/javascript">
                     Calendar.setup({
                         inputField     :   "acqui_date",
-                        ifFormat       :   "%d/%m/%Y",
+                        ifFormat       :   "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
                         button         :   "acqui_date",
                         align          :   "Tl"
                     });
@@ -1064,7 +1064,7 @@ window.onload = irregular_order();
                 <script type="text/javascript">
                     Calendar.setup({
                         inputField   : "beginning_date",
-                        ifFormat     : "%d/%m/%Y",
+                        ifFormat     : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
                         button       : "button1",
                         align        : "Tl"
                     });
@@ -1072,7 +1072,7 @@ window.onload = irregular_order();
                 <script type="text/javascript">
                     Calendar.setup({
                         inputField   : "beginning_date",
-                        ifFormat     : "%d/%m/%Y",
+                        ifFormat     : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
                         button       : "beginning_date",
                         align        : "Tl"
                     });
index 7a00e82..105e438 100755 (executable)
@@ -100,7 +100,9 @@ foreach my $thisbranch (keys %$branches) {
             );
     push @branchloop, \%row;
 }
-$template->param(branchloop => \@branchloop);
+$template->param(branchloop => \@branchloop,
+    DHTMLcalendar_dateformat => get_date_format_string_for_DHTMLcalendar(),
+);
 
 if ($op eq 'mod'||$op eq 'dup') {
     my $subscriptionid = $query->param('subscriptionid');