4 <h1>[% 'history search engine' | $T8 %]</h1>
6 <form method="post" action="am.pl" id="form">
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 <script type="text/javascript">
74 var defaults = ['SAVED', 'DELETED', 'ADDED', 'PAYMENT POSTED', 'POSTED',
75 'POSTED AS NEW', 'SAVED FOR DUNNING', 'DUNNING STARTED', 'PRINTED',
76 'QUEUED', 'CANCELED' ,'IMPORT', 'UNIMPORT' ];
80 'SAVED' : '[% 'SAVED' | $T8 %]',
81 'SCREENED' : '[% 'SCREENED' | $T8 %]',
82 'DELETED' : '[% 'DELETED' | $T8 %]',
83 'ADDED' : '[% 'ADDED' | $T8 %]',
84 'PAYMENT POSTED' : '[% 'PAYMENT POSTED' | $T8 %]',
85 'POSTED' : '[% 'POSTED' | $T8 %]',
86 'POSTED AS NEW' : '[% 'POSTED AS NEW' | $T8 %]',
87 'SAVED FOR DUNNING' : '[% 'SAVED FOR DUNNING' | $T8 %]',
88 'DUNNING STARTED' : '[% 'DUNNING STARTED' | $T8 %]',
89 'PRINTED' : '[% 'PRINTED' | $T8 %]',
90 'QUEUED' : '[% 'QUEUED' | $T8 %]',
91 'CANCELED' : '[% 'CANCELED' | $T8 %]',
92 'IMPORT' : '[% 'IMPORT' | $T8 %]',
93 'UNIMPORT' : '[% 'UNIMPORT' | $T8 %]',
96 function addForm(index) {
97 $('#inputHead').show();
98 selected.push(available.splice(index.index-1, 1));
99 $('#inputText').html($(selected).map(function(){ return translated[this]; }).get().join('<br>'));
100 $('#einschraenkungen').val(selected.join(','));
105 function showForm() {
106 $('#selectForm').empty();
107 $('<option/>').appendTo('#selectForm');
108 $(available).map(function(){
109 $('<option/>').val(this).text(translated[this]).click(function(){ addForm(this) }).appendTo('#selectForm');
113 function resetAll() {
114 available = defaults.slice(0);
118 $('#inputForm').empty();
119 $('#inputText').html('');
120 $('#selectTable, #inputHead, #inputText, #selectEmployee, #selectDate').hide();
121 $('#initForm').show();
124 function initForm() {
127 $('#selectTable, #inputText, #selectEmployee, #selectDate').show();
128 $('#initForm').hide();
133 $('#show_extended_options').click(initForm);
134 $('#reset_button').click(resetAll);