]> git.koha-community.org Git - koha.git/blob - koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tt
Bug 11707: fix editing additional attributes for patron whose category code includes...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / guarantor_search.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; 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; }
6     </style>
7     <script type="text/javascript">
8         <!--
9         function fillguarantor(id) {
10             var $ = window.$;
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();
21
22             var $ = window.opener.$;
23             var form = $('#entryform').get(0);
24
25             if (form.guarantorid.value) {
26                 $("#contact-details").find('a').remove();
27                 $("#contactname, #contactfirstname").parent().find('span').remove();
28             }
29
30             form.guarantorid.value = id;
31             $('#contact-details')
32                 .show()
33                 .find('span')
34                 .after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>');
35
36             $(form.contactname)
37                 .val(surname)
38                 .before('<span>' + surname + '</span>').get(0).type = 'hidden';
39             $(form.contactfirstname)
40                 .val(firstname)
41                 .before('<span>' + firstname + '</span>').get(0).type = 'hidden';
42
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;
51
52             form.guarantorsearch.value = 'Change';
53             self.close();
54         }
55         // -->
56     </script>
57 </head>
58 <body id="pat_guarantor_search" class="pat">
59 <div id="custom-doc" class="yui-t7">
60    <div id="bd">
61         <div class="yui-g">
62         
63
64 <h3>Search for guarantor</h3>
65         <form action="/cgi-bin/koha/members/guarantor_search.pl" method="post">
66                 <fieldset>
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>
73         </form>
74
75 [% IF ( results ) %]
76         <p>Searched for <span class="ex">[% member %]</span>, [% numresults %] patron(s) found:</p>
77         <table>
78                 <tr>
79             <th>Card number</th>
80                         <th>Name</th>
81                         <th>Date of birth</th>
82                         <th>Address</th>
83             <th>Select?</th>
84                 </tr>
85                 [% FOREACH resultsloo IN resultsloop %]
86           [% import(resultsloo) %]
87                         <tr>
88                                 <td>[% cardnumber %]</td>
89                 <td>
90                     [% surname %], [% firstname %]
91                 </td> 
92                                 <td>[% dateofbirth %]</td>
93                                 <td><p>[% address %] [% address2 %] [% city %] [% state %] [% zipcode %] [% country %]</p></td>
94                 <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>
106                   </span>
107
108                     <form action="">
109                         <input type="button" onclick="fillguarantor('[% borrowernumber %]'); return false;" value="Select"/>
110                     </form>
111                 </td>
112                         </tr>
113                 [% END %]
114         </table>
115 [% END %]
116
117 <div id="closewindow"><a href="#" class="close">Cancel</a></div>
118 </div>
119 </div>
120 [% INCLUDE 'intranet-bottom.inc' %]