5 <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
6 <input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
7 <input type="hidden" name="is_vendor" value="[% HTML.escape(is_vendor) %]">
8 <input type="hidden" name="allow_both" value="[% HTML.escape(allow_both) %]">
9 <input type="hidden" name="action_on_cov_selected" value="[% HTML.escape(action_on_cov_selected) %]">
13 <th class="listtop">[% title %]</th>
20 [% 'Please select a customer from the list below.' | $T8 %]
22 [% 'Please select a vendor from the list below.' | $T8 %]
31 <tr class="listheading">
32 <th class="listheading"> </th>
33 [%- FOREACH row = HEADER %]
34 <th nowrap class="listheading"><a href="[% HTML.escape(row.callback) %]">[% row.column_title %]</a></th>
38 [%- FOREACH row = COVS %]
39 <tr class="listrow[% loop.count % 2 %]">
40 <td valign="top"><button type="button" onclick="cov_selected('[% loop.count %]')">Auswahl</button></td>
41 <td valign="top"><input type="hidden" id="id_[% loop.count %]" name="id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
42 <input type="hidden" id="name_[% loop.count %]" name="name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
43 <input type="hidden" id="customer_is_vendor_[% loop.count %]" name="customer_is_vendor_[% loop.count %]" value="[% HTML.escape(row.customer_is_vendor) %]">
44 [% HTML.escape(row.name) %]</td>
45 <td valign="top">[% HTML.escape(row.address) %]</td>
46 <td valign="top">[% HTML.escape(row.contact) %]</td>
57 <script type="text/javascript">
59 function cov_selected(selected) {
60 var name = document.getElementsByName("name_" + selected)[0].value
61 var id = document.getElementsByName("id_" + selected)[0].value
62 var customer_is_vendor = document.getElementsByName("customer_is_vendor_" + selected)[0].value
63 var cov_name = document.forms[0].input_name.value;
64 window.opener.document.getElementsByName(cov_name)[0].value = name;
65 if (document.forms[0].input_id.value != "") {
66 window.opener.document.getElementsByName(document.forms[0].input_id.value)[0].value = id;
69 var cov_is_vendor = cov_name + "_is_vendor";
70 var input = window.opener.document.getElementsByName(cov_is_vendor)[0];
72 input.value = customer_is_vendor;
76 if (cov_name.substr(0, 2) == "f_") {
78 cov_name = cov_name.substr(2);
80 cov_name = prefix + "old_" + cov_name;
81 var input = window.opener.document.getElementsByName(cov_name)[0];
85 cov_name = prefix + "old" + cov_name;
86 input = window.opener.document.getElementsByName(cov_name)[0];
91 if (document.forms[0].action_on_cov_selected.value != "") {
92 window.opener.document.getElementsByName("action")[0].value = document.forms[0].action_on_cov_selected.value;
93 window.opener.document.forms[0].submit();