1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Guarantor search</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <style type="text/css">
5 #custom-doc { width:44.46em;*width:43.39em;min-width:578px; margin:auto; text-align:left; }
7 <script type="text/javascript">
9 function fillguarantor(id) {
11 var surname = $('#' + id + 'surname').text();
12 var firstname = $('#' + id + 'firstname').text();
13 var streetnumber = $('#' + id + 'streetnumber').text();
14 var address = $('#' + id + 'address').text();
15 var address2 = $('#' + id + 'address2').text();
16 var city = $('#' + id + 'city').text();
17 var state = $('#' + id + 'state').text();
18 var zipcode = $('#' + id + 'zipcode').text();
19 var country = $('#' + id + 'country').text();
20 var branchcode = $('#' + id + 'branchcode').text();
22 var $ = window.opener.$;
23 var form = $('#entryform').get(0);
25 if (form.guarantorid.value) {
26 $("#contact-details").find('a').remove();
27 $("#contactname, #contactfirstname").parent().find('span').remove();
30 form.guarantorid.value = id;
34 .after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>');
38 .before('<span>' + surname + '</span>').get(0).type = 'hidden';
39 $(form.contactfirstname)
41 .before('<span>' + firstname + '</span>').get(0).type = 'hidden';
43 form.streetnumber.value = streetnumber;
44 form.address.value = address;
45 form.address2.value = address2;
46 form.city.value = city;
47 form.state.value = state;
48 form.zipcode.value = zipcode;
49 form.country.value = country;
50 form.branchcode.value = branchcode;
52 form.guarantorsearch.value = 'Change';
58 <body id="pat_guarantor_search" class="pat">
59 <div id="custom-doc" class="yui-t7">
64 <h3>Search for guarantor</h3>
65 <form action="/cgi-bin/koha/members/guarantor_search.pl" method="post">
67 <input type="hidden" name="category_type" id="category_type" value="[% category_type %]" />
68 <input type="text" name="member" id="member" value="[% member %]" class="focus" /> Ordered by
69 <select name="orderby">
70 <option value="surname,firstname">Surname</option>
71 <option value="cardnumber">Card number</option>
72 </select> <input type="submit" class="button" value="Search" /></fieldset>
76 <p>Searched for <span class="ex">[% member %]</span>, [% numresults %] patron(s) found:</p>
81 <th>Date of birth</th>
85 [% FOREACH resultsloo IN resultsloop %]
86 [% import(resultsloo) %]
88 <td>[% cardnumber %]</td>
90 [% surname %], [% firstname %]
92 <td>[% dateofbirth %]</td>
93 <td><p>[% address %] [% address2 %] [% city %] [% state %] [% zipcode %] [% country %]</p></td>
95 <span style="display:none;">
96 <span id="[% borrowernumber %]surname">[% surname %]</span>
97 <span id="[% borrowernumber %]firstname">[% firstname %]</span>
98 <span id="[% borrowernumber %]streetnumber">[% streetnumber %]</span>
99 <span id="[% borrowernumber %]address">[% address %]</span>
100 <span id="[% borrowernumber %]address2">[% address2 %]</span>
101 <span id="[% borrowernumber %]city">[% city %]</span>
102 <span id="[% borrowernumber %]state">[% state %]</span>
103 <span id="[% borrowernumber %]zipcode">[% zipcode %]</span>
104 <span id="[% borrowernumber %]country">[% country %]</span>
105 <span id="[% borrowernumber %]branchcode">[% branchcode %]</span>
109 <input type="button" onclick="fillguarantor('[% borrowernumber %]'); return false;" value="Select"/>
117 <div id="closewindow"><a href="#" class="close">Cancel</a></div>
120 [% INCLUDE 'intranet-bottom.inc' %]