calculate_qty (Formel): alu (?) und andere unbenutzte Parameter entfernt
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 9 May 2018 11:44:51 +0000 (13:44 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 14 May 2018 11:22:53 +0000 (13:22 +0200)
bin/mozilla/io.pl
js/calculate_qty.js
templates/webpages/generic/calculate_qty.html

index b4ae880..7cdc751 100644 (file)
@@ -319,8 +319,8 @@ sub display_row {
     my $qty_dec = ($form->{"qty_$i"} =~ /\.(\d+)/) ? length $1 : 2;
 
     $column_data{qty}  = $cgi->textfield(-name => "qty_$i", -size => 5, -class => "numeric", -value => $form->format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec));
-    $column_data{qty} .= $cgi->button(-onclick => "calculate_qty_selection_window('qty_$i','alu_$i', 'formel_$i', $i)", -value => $locale->text('*/'))
-                       . $cgi->hidden(-name => "formel_$i", -value => $form->{"formel_$i"}) . $cgi->hidden("-name" => "alu_$i", "-value" => $form->{"alu_$i"})
+    $column_data{qty} .= $cgi->button(-onclick => "calculate_qty_selection_window('qty_$i', 'formel_$i')", -value => $locale->text('*/'))
+                       . $cgi->hidden(-name => "formel_$i", -value => $form->{"formel_$i"})
       if $form->{"formel_$i"};
 
     $column_data{ship} = '';
index a3bf3ad..e0aecc4 100644 (file)
@@ -1,19 +1,10 @@
-function calculate_qty_selection_window(input_name, alu, formel, row) {
+function calculate_qty_selection_window(input_name, formel) {
   var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
-  var name = document.getElementsByName(input_name)[0].value;
-  if (document.getElementsByName(alu)[0].value == "1") {
-    var action = "calculate_alu";
-    var qty = document.getElementsByName("qty_" + row)[0].value;
-    var description = document.getElementsByName("description_" + row)[0].value;
-  }  else var action = "calculate_qty";
+  var action = "calculate_qty";
   url = "common.pl?" +
     "INPUT_ENCODING=UTF-8&" +
     "action=" + action + "&" +
-    "name=" + encodeURIComponent(name) + "&" +
     "input_name=" + encodeURIComponent(input_name) + "&" +
-    "description=" + encodeURIComponent(description) + "&" +
-    "qty=" + encodeURIComponent(qty) + "&" +
-    "row=" + encodeURIComponent(row) + "&" +
    "formel=" + encodeURIComponent(document.getElementsByName(formel)[0].value)
   //alert(url);
   window.open(url, "_new_generic", parm);
index 110ed41..49c1054 100644 (file)
@@ -5,7 +5,6 @@
  <form name="Form">
 
   <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
-  <input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
 
   <table width="100%">
    <tr><td>[% 'Please insert object dimensions below.' | $T8 %]</td></tr>
@@ -82,4 +81,3 @@
      return arr_int[0] + sep + arr_int[1];
    }
  </script>
-