Report-Generator: Spaltenüberschriften in HTML- und PDF-Ausgaben nicht erneut HTML...
[kivitendo-erp.git] / templates / webpages / common / search_history_master.html
1 [% USE HTML %]<style type="text/css">@import url(js/jscalendar/calendar-win2k-1.css);</style>
2 <script type="text/javascript" src="js/jscalendar/calendar.js"></script>
3 <script type="text/javascript" src="js/jscalendar/lang/calendar-de.js"></script>
4 <script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>
5 <script type="text/javascript" src="js/show_am_history.js"></script>
6
7 <form method="post" onSubmit="javascript:set_history_uri();">
8
9 <input type="hidden" name="login" value="[% HTML.escape(login) %]">
10 <input type="hidden" name="password" value="[% HTML.escape(password) %]">
11 <input type="hidden" name="action" value="show_am_history">
12
13         <table>
14                 <tr>
15                         <th class ="listtop"><translate>history search engine</translate></th>
16                         </th>
17                 </tr>
18                 <tr>
19                         <td>
20                                 <script type="text/javascript">
21                                         <!--
22                     function uncheckOther(id) {
23                                                 if(!(
24                                                     (document.getElementById('non-deleted').checked == false)
25                                                 &&
26                                                     (document.getElementById('both').checked == false)
27                                                     &&
28                                                     (document.getElementById('deleted').checked == false)
29                                                   )) {
30                                                                 if(id == "deleted") {
31                                                                         document.getElementById('non-deleted').checked = false;
32                                                                         document.getElementById('both').checked = false;
33                                                                 }
34                                                                 if(id == "non-deleted") {
35                                                                         document.getElementById('deleted').checked = false;
36                                                                         document.getElementById('both').checked = false;
37                                                                 }
38                                                                 if(id == "both") {
39                                                                         document.getElementById('non-deleted').checked = false;
40                                                                         document.getElementById('deleted').checked = false;
41                                                                 }
42                                                 }
43                                         }
44
45                                         var defaults = new Array('SAVED', 'DELETED', 'ADDED', 'PAYMENT POSTED', 'POSTED', 'POSTED AS NEW', 'SAVED FOR DUNNING', 'DUNNING STARTED', 'PRINTED');
46                                         var translated = new Object();
47                                         translated['SAVED'] = '<translate>SAVED</translate>';
48                                         translated['DELETED'] = '<translate>DELETED</translate>';
49                                         translated['ADDED'] = '<translate>ADDED</translate>';
50                                         translated['PAYMENT POSTED'] = '<translate>PAYMENT POSTED</translate>';
51                                         translated['POSTED'] = '<translate>POSTED</translate>';
52                                         translated['POSTED AS NEW'] = '<translate>POSTED AS NEW</translate>'
53                                         translated['SAVED FOR DUNNING'] = '<translate>SAVED FOR DUNNING</translate>';
54                                         translated['DUNNING STARTED'] = '<translate>DUNNING STARTED</translate>';
55                                         translated['PRINTED'] = '<translate>PRINTED</translate>';
56
57                                         var jscalender = "<table valign=\"top\">"
58                                                                         + "<tr><td colspan=\"2\"><b><translate>Period</translate>:&nbsp;</b></td></tr>"
59                                                                         + "<tr><td><translate>from (time)</translate>:&nbsp;"
60                                                                         + "<input name=\"transdate\" id=\"transdate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(transdate) %]\" onChange=\"document.getElementById(\'transdate_hidden\').value=this.value;\">"
61                                                                         + "<input type=\"button\" name=\"transdate\" id=\"trigger1\" value=\"?\">"
62                                                                         + "&nbsp;</td><td><translate>to (time)</translate>:&nbsp;"
63                                                                         + "<input name=\"reqdate\" id=\"reqdate\" size=\"11\" title=\"[% HTML.escape(myconfig_dateformat) %]\" value=\"[% HTML.escape(reqdate) %]\" onChange=\"document.getElementById(\'reqdate_hidden\').value=this.value;\">"
64                                                                         + "<input type=\"button\" name=\"reqdate\" id=\"trigger2\" value=\"?\"></td></tr></table>";
65                                         var mitarbeiter = "<table valign=\"top\">"
66                                                                         + "<tr><td><b>Mitarbeiter:</b>&nbsp;</td>"
67                                                                         + "<td><input type='text' name='mitarbeiter' id='mitarbeiter' onChange=\"document.getElementById(\'mitarbeiter_hidden\').value=this.value;\"></td>"
68                                                                         + "</tr></table>";
69
70                                         var tempString = "";
71                                         function addForm(last, remove) {
72                                                 if(last == "INIT") {
73                                                         tempString = "<select id='selectForm'><option></option>";
74                                                         for(i=0;i<defaults.length;i++) {
75                                                                 tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n";
76                                                         }
77                                                         tempString += "</select>";
78                                                         document.getElementById('selectEmployee').innerHTML = mitarbeiter;
79                                                         document.getElementById('selectDate').innerHTML = jscalender;
80                                                         document.getElementById('selectTable').innerHTML = tempString;
81
82                                                         Calendar.setup(
83                                         {
84                                       inputField : "transdate",
85                                       ifFormat :"%d.%m.%Y",
86                                       align : "BL",
87                                       button : "trigger1"
88                                         });
89
90                                             Calendar.setup(
91                                                 {
92                                       inputField : "reqdate",
93                                           ifFormat :"%d.%m.%Y",
94                                           align : "BL",
95                                           button : "trigger2"
96                                                 });
97                                                 }
98                                                 else {
99                                                         defaults.splice(remove,1);
100                                                         document.getElementById('inputText').innerHTML += ((document.getElementById('inputText').innerHTML == "") ? ("<b><translate>You've already chosen the following limitations:</translate></b><br>") : ("<br>")) + translated[last];
101                                                         if(defaults.length > 0) {
102                                                                 document.getElementById('einschraenkungen').value += ((document.getElementById('einschraenkungen').value == "") ? ("") : (",")) + last;
103                                                                 tempString = "<select id='selectForm'><option></option>";
104                                                                 for(i=0;i<defaults.length;i++) {
105                                                                         tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n";
106                                                                 }
107                                                                 tempString += "</select>";
108                                                                 document.getElementById('selectTable').innerHTML = tempString;
109                                                         }
110                                                         else {
111                                                                 document.getElementById('selectTable').innerHTML = "";
112                                                         }
113                                                 }
114                                         }
115
116                                         function resetAll() {
117                                                 document.getElementById('selectTable').innerHTML = "<a href=\"javascript:addForm('INIT')\"><translate>Yes</translate>";
118                                                 document.getElementById('inputText').innerHTML = "";
119                                         }
120                                         //-->
121                                 </script>
122                                 <table>
123                                         <tr>
124                                                 <td>
125                                                         <translate><b>What</b> do you want to look for?</translate>:
126                                                 </td>
127                                                 <td>
128                                                         <select name="what2search" id="what2search">
129                                                                 <option name="Artikelnummer" value="Artikelnummer" id="Artikelnummer"><translate>Part Number</translate></option>
130                                                                 <option name="Kundennummer" value="Kundennummer" id="Kundennummer"><translate>Customer Number</translate></option>
131                                                                 <option name="Lieferantennummer" value="Lieferantennummer" id="Lieferantennummer"><translate>Vendor Number</translate></option>
132                                                                 <option name="Projektnummer" value="Projektnummer" id="Projektnummer"><translate>Project Number</translate></option>
133                                                                 <option name="Buchungsnummer" value="Buchungsnummer" id="Buchungsnummer"><translate>ID</translate></option>
134                                                                 <option name="Eingangsrechnungnummer" value="Eingangsrechnungnummer" id="Eingangsrechnungnummer"><translate>Incoming invoice number</translate></option>
135                                                                 <option name="Ausgangsrechnungnummer" value="Ausgangsrechnungnummer" id="Ausgangsrechnungnummer"><translate>Sales invoice number</translate></option>
136                 <option name="Mahnungsnummer" value="Mahnungsnummer" id="Mahnungsnummer"><translate>Dunning number</translate></option>
137                                                         </select>
138                                                 </td>
139                                         </tr>
140                                         <tr>
141                                                 <td>
142                                                  <translate>What's the <b>term</b> you're looking for?</translate>
143                                                 </td>
144                                                 <td>
145                                                         <input type="text" name="searchid" id="searchid" value="[% HTML.escape(searchid) %]">
146                                                 </td>
147                                         </tr>
148                                         <tr>
149                                                 <td valign="top">
150                                                  <translate>Do you want to <b>limit</b> your search?</translate>
151                                                 </td>
152                                                 <td>
153                                                         <table valign=\"top\" cellpadding=\"0\" marginheight=\"0\" marginwidth=\"0\" cellspacing=\"0\" topmargin=\"0\" leftmargin=\"0\">
154                                                                 <tr>
155                                                                         <td>
156                                                                                 <div id="selectTable"><a href="javascript:addForm('INIT')"><translate>Yes</translate></div>
157                                                                                 <div id="inputText"></div>
158                                                                         </td>
159                                                                 </tr>
160                                                                 <tr>
161                                                                         <td>
162                                                                                 <div id="selectEmployee"></div>
163                                                                         </td>
164                                                                 </tr>
165                                                                 <tr>
166                                                                         <td>
167                                                                                 <div id="selectDate"></div>
168                                                                         </td>
169                                                                 </tr>
170                                                         </table>
171                                                         <input type="hidden" name="einschraenkungen" id="einschraenkungen" value="">
172                                                 </td>
173                                         </tr>
174                                         </tr>
175                                         <tr>
176                                                 <td colspan="6">
177               <input type="hidden" value="" id="transdate_hidden">
178               <input type="hidden" value="" id="reqdate_hidden">
179               <input type="hidden" value="" id="mitarbeiter_hidden">
180                                                         <input type="button" value="<translate>submit</translate>" onClick="javascript:set_history_uri();">
181                                                         <input type="reset" value="<translate>reset</translate>" onClick="javascript:resetAll();">
182                                                 </td>
183                                                 <td>
184                                                 </td>
185                                         </tr>
186                                 </table>
187                         </td>
188                 </tr>
189         </table>
190 </form>