Die Historiensuchmaske nicht mehr per JavaScript abschicken und dem <form>-Element...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 6 May 2009 13:27:14 +0000 (13:27 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 6 May 2009 13:27:14 +0000 (13:27 +0000)
SL/Form.pm
js/show_am_history.js [deleted file]
locale/de/am
templates/webpages/common/search_history_de.html
templates/webpages/common/search_history_master.html

index 2d4d5e4..675d9ad 100644 (file)
@@ -3168,9 +3168,8 @@ sub get_history {
       qq|SELECT h.employee_id, h.itime::timestamp(0) AS itime, h.addition, h.what_done, emp.name, h.snumbers, h.trans_id AS id | .
       qq|FROM history_erp h | .
       qq|LEFT JOIN employee emp ON (emp.id = h.employee_id) | .
-      qq|WHERE trans_id = | . $trans_id
-      . $restriction . qq| |
-      . $order;
+      qq|WHERE (trans_id = | . $trans_id . qq|) $restriction | .
+      $order;
 
     my $sth = $dbh->prepare($query) || $self->dberror($query);
 
diff --git a/js/show_am_history.js b/js/show_am_history.js
deleted file mode 100644 (file)
index ff1db6c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-function set_history_uri() {
-  document.location.href = "am.pl?" +
-    "action=show_am_history&" +
-    "longdescription=" + "&" +
-    "einschraenkungen=" + document.getElementById("einschraenkungen").value + "&" +
-    "fromdate=" + document.getElementById("fromdate_hidden").value + "&" +
-    "todate=" + document.getElementById("todate_hidden").value + "&" +
-    "what2search=" + document.getElementById("what2search").value + "&" +
-    "searchid=" + document.getElementById("searchid").value + "&" +
-    "mitarbeiter=" + document.getElementById("mitarbeiter_hidden").value + "&";
-}
index 3aaf115..ebce22a 100644 (file)
@@ -474,6 +474,7 @@ $self->{subs} = {
   'neue_ware'                   => 'new_part',
   'speichern'                   => 'save',
   'als_neu_speichern'           => 'save_as_new',
+  'abschicken'                  => 'submit',
 };
 
 1;
index 8f8b130..a8f58e9 100644 (file)
@@ -2,9 +2,8 @@
 <script type="text/javascript" src="js/jscalendar/calendar.js"></script>
 <script type="text/javascript" src="js/jscalendar/lang/calendar-de.js"></script>
 <script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>
-<script type="text/javascript" src="js/show_am_history.js"></script>
 
-<form method="post" onSubmit="javascript:set_history_uri();">
+<form method="post" action="am.pl">
 
 <input type="hidden" name="action" value="show_am_history">
 
                                        var jscalender = "<table valign=\"top\">"
                                                                        + "<tr><td colspan=\"2\"><b>Zeitraum:&nbsp;</b></td></tr>"
                                                                        + "<tr><td>von:&nbsp;"
-                                                                       + "<input name=\"fromdate\" id=\"fromdate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(fromdate) %]\" onChange=\"document.getElementById(\'fromdate_hidden\').value=this.value;\">"
+                                                                       + "<input name=\"fromdate\" id=\"fromdate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(fromdate) %]\">"
                                                                        + "<input type=\"button\" name=\"fromdate\" id=\"trigger1\" value=\"?\">"
                                                                        + "&nbsp;</td><td>bis:&nbsp;"
-                                                                       + "<input name=\"todate\" id=\"todate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(todate) %]\" onChange=\"document.getElementById(\'todate_hidden\').value=this.value;\">"
+                                                                       + "<input name=\"todate\" id=\"todate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(todate) %]\">"
                                                                        + "<input type=\"button\" name=\"todate\" id=\"trigger2\" value=\"?\"></td></tr></table>";
                                        var mitarbeiter = "<table valign=\"top\">"
                                                                        + "<tr><td><b>Mitarbeiter:</b>&nbsp;</td>"
-                                                                       + "<td><input type='text' name='mitarbeiter' id='mitarbeiter' onChange=\"document.getElementById(\'mitarbeiter_hidden\').value=this.value;\"></td>"
+                                                                       + "<td><input type='text' name='mitarbeiter' id='mitarbeiter'></td>"
                                                                        + "</tr></table>";
 
                                        var tempString = "";
                                        </tr>
                                        <tr>
                                                <td colspan="6">
-              <input type="hidden" value="" id="fromdate_hidden">
-              <input type="hidden" value="" id="todate_hidden">
-              <input type="hidden" value="" id="mitarbeiter_hidden">
-                                                       <input type="button" value="abschicken" onClick="javascript:set_history_uri();">
-                                                       <input type="reset" value="zurücksetzen" onClick="javascript:resetAll();">
+                                                       <input type="submit" class="submit" value="abschicken">
+                                                       <input type="reset" class="submit" value="zurücksetzen" onClick="javascript:resetAll();">
                                                </td>
                                                <td>
                                                </td>
index 2bcd760..e2a9ba7 100644 (file)
@@ -2,9 +2,8 @@
 <script type="text/javascript" src="js/jscalendar/calendar.js"></script>
 <script type="text/javascript" src="js/jscalendar/lang/calendar-de.js"></script>
 <script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>
-<script type="text/javascript" src="js/show_am_history.js"></script>
 
-<form method="post" onSubmit="javascript:set_history_uri();">
+<form method="post" action="am.pl">
 
 <input type="hidden" name="action" value="show_am_history">
 
                                        var jscalender = "<table valign=\"top\">"
                                                                        + "<tr><td colspan=\"2\"><b><translate>Period</translate>:&nbsp;</b></td></tr>"
                                                                        + "<tr><td><translate>from (time)</translate>:&nbsp;"
-                                                                       + "<input name=\"fromdate\" id=\"fromdate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(fromdate) %]\" onChange=\"document.getElementById(\'fromdate_hidden\').value=this.value;\">"
+                                                                       + "<input name=\"fromdate\" id=\"fromdate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(fromdate) %]\">"
                                                                        + "<input type=\"button\" name=\"fromdate\" id=\"trigger1\" value=\"?\">"
                                                                        + "&nbsp;</td><td><translate>to (time)</translate>:&nbsp;"
-                                                                       + "<input name=\"todate\" id=\"todate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(todate) %]\" onChange=\"document.getElementById(\'todate_hidden\').value=this.value;\">"
+                                                                       + "<input name=\"todate\" id=\"todate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(todate) %]\">"
                                                                        + "<input type=\"button\" name=\"todate\" id=\"trigger2\" value=\"?\"></td></tr></table>";
                                        var mitarbeiter = "<table valign=\"top\">"
                                                                        + "<tr><td><b>Mitarbeiter:</b>&nbsp;</td>"
-                                                                       + "<td><input type='text' name='mitarbeiter' id='mitarbeiter' onChange=\"document.getElementById(\'mitarbeiter_hidden\').value=this.value;\"></td>"
+                                                                       + "<td><input type='text' name='mitarbeiter' id='mitarbeiter'></td>"
                                                                        + "</tr></table>";
 
                                        var tempString = "";
                                        </tr>
                                        <tr>
                                                <td colspan="6">
-              <input type="hidden" value="" id="fromdate_hidden">
-              <input type="hidden" value="" id="todate_hidden">
-              <input type="hidden" value="" id="mitarbeiter_hidden">
-                                                       <input type="button" value="<translate>submit</translate>" onClick="javascript:set_history_uri();">
-                                                       <input type="reset" value="<translate>reset</translate>" onClick="javascript:resetAll();">
+                                                       <input type="submit" class="submit" value="<translate>submit</translate>">
+                                                       <input type="reset" class="submit" value="<translate>reset</translate>" onClick="javascript:resetAll();">
                                                </td>
                                                <td>
                                                </td>