7 <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
8 <input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
9 <input type="hidden" name="is_vendor" value="[% HTML.escape(is_vendor) %]">
10 <input type="hidden" name="allow_both" value="[% HTML.escape(allow_both) %]">
11 <input type="hidden" name="action_on_cov_selected" value="[% HTML.escape(action_on_cov_selected) %]">
16 [% 'Please select a customer from the list below.' | $T8 %]
18 [% 'Please select a vendor from the list below.' | $T8 %]
27 <tr class="listheading">
28 <th class="listheading"> </th>
29 [%- FOREACH row = HEADER %]
30 <th nowrap class="listheading"><a href="[% HTML.escape(row.callback) %]">[% row.column_title %]</a></th>
34 [%- FOREACH row = COVS %]
35 <tr class="listrow[% loop.count % 2 %]">
36 <td valign="top"><button type="button" onclick="cov_selected('[% loop.count %]')">Auswahl</button></td>
37 <td valign="top"><input type="hidden" id="id_[% loop.count %]" name="id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
38 <input type="hidden" id="name_[% loop.count %]" name="name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
39 <input type="hidden" id="customer_is_vendor_[% loop.count %]" name="customer_is_vendor_[% loop.count %]" value="[% HTML.escape(row.customer_is_vendor) %]">
40 [% HTML.escape(row.name) %]</td>
41 <td valign="top">[% HTML.escape(row.address) %]</td>
42 <td valign="top">[% HTML.escape(row.contact) %]</td>
53 <script type="text/javascript">
55 function cov_selected(selected) {
56 var name = document.getElementsByName("name_" + selected)[0].value
57 var id = document.getElementsByName("id_" + selected)[0].value
58 var customer_is_vendor = document.getElementsByName("customer_is_vendor_" + selected)[0].value
59 var cov_name = document.forms[0].input_name.value;
60 window.opener.document.getElementsByName(cov_name)[0].value = name;
61 if (document.forms[0].input_id.value != "") {
62 window.opener.document.getElementsByName(document.forms[0].input_id.value)[0].value = id;
65 var cov_is_vendor = cov_name + "_is_vendor";
66 var input = window.opener.document.getElementsByName(cov_is_vendor)[0];
68 input.value = customer_is_vendor;
72 if (cov_name.substr(0, 2) == "f_") {
74 cov_name = cov_name.substr(2);
76 cov_name = prefix + "old_" + cov_name;
77 var input = window.opener.document.getElementsByName(cov_name)[0];
81 cov_name = prefix + "old" + cov_name;
82 input = window.opener.document.getElementsByName(cov_name)[0];
87 if (document.forms[0].action_on_cov_selected.value != "") {
88 window.opener.document.getElementsByName("action")[0].value = document.forms[0].action_on_cov_selected.value;
89 window.opener.document.forms[0].submit();