Vereinfachtes Template, und alten Code entfernt.
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 11 Jul 2008 15:15:43 +0000 (15:15 +0000)
committerSven Schöling <s.schoeling@linet-services.de>
Fri, 11 Jul 2008 15:15:43 +0000 (15:15 +0000)
bin/mozilla/oe.pl
templates/webpages/oe/form_header_de.html
templates/webpages/oe/form_header_master.html

index fe77887..501dec2 100644 (file)
@@ -274,16 +274,6 @@ sub form_header {
 
   # use JavaScript Calendar or not
   $form->{jsscript} = 1;
-  $TMPL_VAR{button1} = qq|
-     <td nowrap><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\">
-      <input type=button name=transdate id="trigger1" value=| . $locale->text('button') . qq|></td>
-    |;
-  $TMPL_VAR{button2} = qq|
-     <td nowrap width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value="$form->{reqdate}" onBlur=\"check_right_date_format(this)\">
-      <input type=button name=reqdate name=reqdate id="trigger2" value=| . $locale->text('button') . qq|></td>
-   |;
-  #write Trigger
-  $TMPL_VAR{jsscript} = Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1", "reqdate", "BL", "trigger2");
 
   # openclosed checkboxes
   my @tmp;
@@ -293,18 +283,7 @@ sub form_header {
                         $form->{"closed"}    ? "checked" : "",  $locale->text('Closed')    if $form->{id};
   $TMPL_VAR{openclosed} = sprintf qq|<tr><td colspan=%d align=center>%s</td></tr>\n|, 2 * scalar @tmp, join "\n", @tmp if @tmp;
 
-  # set option selected
-  foreach $item ($form->{vc}, 'currency', 'department', ($form->{vc} eq "customer" ? 'customer' : 'vendor')) {
-    $form->{"select$item"} =~ s/ selected//;
-    $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
-  }
-
-  #quote select[customer|vendor] Bug 133
-  $form->{"select$form->{vc}"} = $form->quote($form->{"select$form->{vc}"});
-
-  #substitute \n and \r to \s (bug 543)
-  $form->{"select$form->{vc}"} =~ s/[\n\r]/&nbsp;/g;
-  
+  # project ids
   my @old_project_ids = ($form->{"globalproject_id"}, grep { $_ } map { $form->{"project_id_$_"} } 1..$form->{"rowcount"});
 
   my $vc = $form->{vc} eq "customer" ? "customers" : "vendors";
index 064908a..8f158c9 100644 (file)
                       Angebotsdatum
                      [%- END %]
                     </th>
-                    [% button1 %]
+                    <td nowrap>
+                      <input name=transdate id=transdate size=11 title="[% HTML.escape(dateformat) %]" value="[% transdate %]" onBlur="check_right_date_format(this)">
+                      <input type=button name=transdate id="trigger1" value="?">
+                    </td>
                   </tr>
                   <tr>
                     <th align="right" nowrap>
                       Lieferdatum
                      [%- END %]
                     </th>
-                    [% button2 %]
+                    <td nowrap>
+                      <input name=reqdate id=reqdate size=11 title="[% HTML.escape(dateformat) %]" value="[% reqdate %]" onBlur="check_right_date_format(this)">
+                      <input type=button name=reqdate id="trigger2" value="?">
+                    </td>
                   </tr>
                   <tr>
                     <th width="70%" align="right" nowrap>Projektnummer</th>
         </td>
       </tr>
 
-      [% jsscript %]
+    <script type="text/javascript">
+     <!--
+       Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" });
+       Calendar.setup({ inputField : "reqdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
+     //-->
+    </script>
index 6521c6f..1849c46 100644 (file)
                       <translate>Quotation Date</translate>
                      [%- END %]
                     </th>
-                    [% button1 %]
+                    <td nowrap>
+                      <input name=transdate id=transdate size=11 title="[% HTML.escape(dateformat) %]" value="[% transdate %]" onBlur="check_right_date_format(this)">
+                      <input type=button name=transdate id="trigger1" value="<translate>button</translate>">
+                    </td>
                   </tr>
                   <tr>
                     <th align="right" nowrap>
                       <translate>Required by</translate>
                      [%- END %]
                     </th>
-                    [% button2 %]
+                    <td nowrap>
+                      <input name=reqdate id=reqdate size=11 title="[% HTML.escape(dateformat) %]" value="[% reqdate %]" onBlur="check_right_date_format(this)">
+                      <input type=button name=reqdate id="trigger2" value="<translate>button</translate>">
+                    </td>
                   </tr>
                   <tr>
                     <th width="70%" align="right" nowrap><translate>Project Number</translate></th>
         </td>
       </tr>
 
-      [% jsscript %]
+    <script type="text/javascript">
+     <!--
+       Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" });
+       Calendar.setup({ inputField : "reqdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
+     //-->
+    </script>