Merge branch 'master' of git@lx-office.linet-services.de:lx-office-erp
authorC. Braun <information@lx-office-hosting.de>
Fri, 13 May 2011 12:49:10 +0000 (14:49 +0200)
committerC. Braun <information@lx-office-hosting.de>
Fri, 13 May 2011 12:49:10 +0000 (14:49 +0200)
bin/mozilla/oe.pl
templates/webpages/oe/form_header.html

index 70e020f..2acf9fe 100644 (file)
@@ -393,9 +393,8 @@ sub form_header {
           : ($creditwarning)                                   ? "alert('$credittext')"
           :                                                      "";
 
-  $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
-  $onload .= qq|;setupPoints('|.   $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
-  $TMPL_VAR{onload} = $onload;
+  $TMPL_VAR{dateformat}          = $myconfig{dateformat};
+  $TMPL_VAR{numberformat}        = $myconfig{numberformat};
 
   if ($form->{type} eq 'sales_order') {
     if (!$form->{periodic_invoices_config}) {
index c07cd59..a046761 100644 (file)
@@ -2,7 +2,7 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
-<body onLoad="[% onload %]">
+<body>
 
   <form method="post" name="oe" action="[% script %]">
 
      <!--
        Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" });
        Calendar.setup({ inputField : "reqdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
+
+       $('document').ready(function(){
+         setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
+         setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
+       });
      //-->
     </script>