4 <h1>[% 'history search engine' | $T8 %]</h1>
6 <form method="post" action="am.pl">
8 <input type="hidden" name="action" value="show_am_history">
12 <td>[% '<b>What</b> do you want to look for?' | $T8 %]:</td>
14 <select name="what2search" id="what2search">
15 <option name="Artikelnummer" value="Artikelnummer" id="Artikelnummer">[% 'Part Number' | $T8 %]</option>
16 <option name="Kundennummer" value="Kundennummer" id="Kundennummer">[% 'Customer Number' | $T8 %]</option>
17 <option name="Lieferantennummer" value="Lieferantennummer" id="Lieferantennummer">[% 'Vendor Number' | $T8 %]</option>
18 <option name="Projektnummer" value="Projektnummer" id="Projektnummer">[% 'Project Number' | $T8 %]</option>
19 <option name="Auftragsnummer" value="Auftragsnummer" id="Auftragsnummer">[% 'Order Number' | $T8 %]</option>
20 <option name="Angebotsnummer" value="Angebotsnummer" id="Angebotsnummer">[% 'Quotation Number' | $T8 %]</option>
21 <option name="Eingangsrechnungnummer" value="Eingangsrechnungnummer" id="Eingangsrechnungnummer">[% 'Incoming invoice number' | $T8 %]</option>
22 <option name="Ausgangsrechnungnummer" value="Ausgangsrechnungnummer" id="Ausgangsrechnungnummer">[% 'Sales invoice number' | $T8 %]</option>
23 <option name="Mahnungsnummer" value="Mahnungsnummer" id="Mahnungsnummer">[% 'Dunning number' | $T8 %]</option>
24 <option name="Buchungsnummer" value="Buchungsnummer" id="Buchungsnummer">[% 'ID' | $T8 %]</option>
29 <td>[% 'What <b>term</b> you are looking for?' | $T8 %]</td>
30 <td><input type="text" name="searchid" id="searchid" value="[% searchid | html %]"></td>
33 <td valign="top">[% 'Do you want to <b>limit</b> your search?' | $T8 %]</td>
39 <a id='show_extended_options' href='#'>[% 'Yes' | $T8 %]</a>
41 <div id="selectTable" style="display:none;">
42 <select id='selectForm'>
45 <div id="inputHead" style="display:none;"><b>[% 'You\'ve already chosen the following limitations:' | $T8 %]</b></div>
46 <div id="inputText" style="display:none;"></div>
51 <div id="selectEmployee" style="display:none;">
52 <b>Mitarbeiter:</b> <input type="text" name="mitarbeiter" id="mitarbeiter">
58 <div id="selectDate" style="display:none;">
59 <b>[% 'Period' | $T8 %]: </b>
60 [% 'from (time)' | $T8 %]: [% L.date_tag('fromdate', todate) %]
61 [% 'to (time)' | $T8 %]: [% L.date_tag('todate', todate) %]
66 <input type="hidden" name="einschraenkungen" id="einschraenkungen" value="">
72 <input type="submit" class="submit" value="[% 'submit' | $T8 %]">
73 <input type="reset" class="submit" value="[% 'reset' | $T8 %]" id='reset_button'>
77 <script type="text/javascript">
79 var defaults = ['SAVED', 'DELETED', 'ADDED', 'PAYMENT POSTED', 'POSTED', 'POSTED AS NEW', 'SAVED FOR DUNNING', 'DUNNING STARTED', 'PRINTED'];
83 'SAVED' : '[% 'SAVED' | $T8 %]',
84 'DELETED' : '[% 'DELETED' | $T8 %]',
85 'ADDED' : '[% 'ADDED' | $T8 %]',
86 'PAYMENT POSTED' : '[% 'PAYMENT POSTED' | $T8 %]',
87 'POSTED' : '[% 'POSTED' | $T8 %]',
88 'POSTED AS NEW' : '[% 'POSTED AS NEW' | $T8 %]',
89 'SAVED FOR DUNNING' : '[% 'SAVED FOR DUNNING' | $T8 %]',
90 'DUNNING STARTED' : '[% 'DUNNING STARTED' | $T8 %]',
91 'PRINTED' : '[% 'PRINTED' | $T8 %]',
94 function addForm(index) {
95 $('#inputHead').show();
96 selected.push(available.splice(index, 1));
97 $('#inputText').html($(selected).map(function(){ return translated[this]; }).get().join('<br>'));
98 $('#einschraenkungen').val(selected.join(','));
103 function showForm() {
104 $('#selectForm').empty();
105 $('<option/>').appendTo('#selectForm');
106 $(available).map(function(){
107 $('<option/>').val(this).text(translated[this]).click(function(){ addForm(this) }).appendTo('#selectForm');
111 function resetAll() {
112 available = defaults.slice(0);
116 $('#inputForm').empty();
117 $('#inputText').html('');
118 $('#selectTable, #inputHead, #inputText, #selectEmployee, #selectDate').hide();
119 $('#initForm').show();
122 function initForm() {
125 $('#selectTable, #inputText, #selectEmployee, #selectDate').show();
126 $('#initForm').hide();
131 $('#show_extended_options').click(initForm);
132 $('#reset_button').click(resetAll);