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="Buchungsnummer" value="Buchungsnummer" id="Buchungsnummer">[% 'ID' | $T8 %]</option>
20 <option name="Eingangsrechnungnummer" value="Eingangsrechnungnummer" id="Eingangsrechnungnummer">[% 'Incoming invoice number' | $T8 %]</option>
21 <option name="Ausgangsrechnungnummer" value="Ausgangsrechnungnummer" id="Ausgangsrechnungnummer">[% 'Sales invoice number' | $T8 %]</option>
22 <option name="Mahnungsnummer" value="Mahnungsnummer" id="Mahnungsnummer">[% 'Dunning number' | $T8 %]</option>
27 <td>[% 'What <b>term</b> you are looking for?' | $T8 %]</td>
28 <td><input type="text" name="searchid" id="searchid" value="[% searchid | html %]"></td>
31 <td valign="top">[% 'Do you want to <b>limit</b> your search?' | $T8 %]</td>
37 <a id='show_extended_options' href='#'>[% 'Yes' | $T8 %]</a>
39 <div id="selectTable" style="display:none;">
40 <select id='selectForm'>
43 <div id="inputHead" style="display:none;"><b>[% 'You\'ve already chosen the following limitations:' | $T8 %]</b></div>
44 <div id="inputText" style="display:none;"></div>
49 <div id="selectEmployee" style="display:none;">
50 <b>Mitarbeiter:</b> <input type="text" name="mitarbeiter" id="mitarbeiter">
56 <div id="selectDate" style="display:none;">
57 <b>[% 'Period' | $T8 %]: </b>
58 [% 'from (time)' | $T8 %]: [% L.date_tag('fromdate', todate) %]
59 [% 'to (time)' | $T8 %]: [% L.date_tag('todate', todate) %]
64 <input type="hidden" name="einschraenkungen" id="einschraenkungen" value="">
70 <input type="submit" class="submit" value="[% 'submit' | $T8 %]">
71 <input type="reset" class="submit" value="[% 'reset' | $T8 %]" id='reset_button'>
75 <script type="text/javascript">
77 var defaults = ['SAVED', 'DELETED', 'ADDED', 'PAYMENT POSTED', 'POSTED', 'POSTED AS NEW', 'SAVED FOR DUNNING', 'DUNNING STARTED', 'PRINTED'];
81 'SAVED' : '[% 'SAVED' | $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 %]',
92 function addForm(index) {
93 $('#inputHead').show();
94 selected.push(available.splice(index, 1));
95 $('#inputText').html($(selected).map(function(){ return translated[this]; }).get().join('<br>'));
96 $('#einschraenkungen').val(selected.join(','));
101 function showForm() {
102 $('#selectForm').empty();
103 $('<option/>').appendTo('#selectForm');
104 $(available).map(function(){
105 $('<option/>').val(this).text(translated[this]).click(function(){ addForm(this) }).appendTo('#selectForm');
109 function resetAll() {
110 available = defaults.slice(0);
114 $('#inputForm').empty();
115 $('#inputText').html('');
116 $('#selectTable, #inputHead, #inputText, #selectEmployee, #selectDate').hide();
117 $('#initForm').show();
120 function initForm() {
123 $('#selectTable, #inputText, #selectEmployee, #selectDate').show();
124 $('#initForm').hide();
129 $('#show_extended_options').click(initForm);
130 $('#reset_button').click(resetAll);