Merge remote branch 'kc/new/bug_5586' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / guarantor_search.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Guarantor Search</title>
3 <!-- TMPL_INCLUDE NAME="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, surname, firstname, streetnumber, address, city, zipcode) {
10             var $ = window.opener.$;
11             var form = $('#entryform').get(0);
12
13             if (form.guarantorid.value) {
14                 $("#contact-details").find('a').remove();
15                 $("#contactname, #contactfirstname").parent().find('span').remove();
16             }
17
18             form.guarantorid.value = id;
19             $('#contact-details')
20                 .show()
21                 .find('span')
22                 .after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>');
23
24             $(form.contactname)
25                 .val(surname)
26                 .before('<span>' + surname + '</span>').get(0).type = 'hidden';
27             $(form.contactfirstname)
28                 .val(firstname)
29                 .before('<span>' + firstname + '</span>').get(0).type = 'hidden';
30
31             form.streetnumber.value = streetnumber;
32             form.address.value = address;
33             form.city.value = city;
34             form.zipcode.value = zipcode;
35
36             form.guarantorsearch.value = 'Change';
37             self.close();
38         }
39         // -->
40     </script>
41 </head>
42
43 <div id="custom-doc" class="yui-t7">
44    <div id="bd">
45         <div class="yui-g">
46         
47
48 <h3>Search for guarantor</h3>
49         <form action="/cgi-bin/koha/members/guarantor_search.pl" method="post">
50                 <fieldset>
51                 <input type="hidden" name="category_type" id="category_type" value="<!-- TMPL_VAR NAME="category_type" -->" />
52                 <input type="text" name="member" id="member" value="<!-- TMPL_VAR NAME="member" -->" class="focus" /> Ordered by
53                 <select name="orderby">
54                         <option value="surname,firstname">Surname</option>
55                         <option value="cardnumber">Cardnumber</option>
56                 </select> <input type="submit" class="button" value="Search" /></fieldset>
57         </form>
58
59 <!--TMPL_IF NAME="results" -->
60         <p>Searched for <span class="ex"><!-- TMPL_VAR NAME="member" --></span>, <!-- TMPL_VAR Name ="numresults" --> patron(s) found:</p>
61         <table>
62                 <tr>
63                         <th>Cardnumber</th>
64                         <th>Name</th>
65                         <th>Date of birth</th>
66                         <th>Address</th>
67             <th>Select?</th>
68                 </tr>
69                 <!-- TMPL_LOOP NAME="resultsloop" -->
70                         <tr>
71                                 <td><!-- TMPL_VAR NAME="cardnumber" --></td>
72                 <td>
73                     <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" -->
74                 </td> 
75                                 <td><!-- TMPL_VAR NAME="dateofbirth" --></td>
76                                 <td><p><!-- TMPL_VAR NAME="address" --> <!-- TMPL_VAR NAME="city" --></p></td>
77                 <td>
78                     <form action="">
79                         <input type="button" onclick="fillguarantor('<!-- TMPL_VAR NAME="borrowernumber" -->', '<!-- TMPL_VAR NAME="surname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="firstname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="streetnumber" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="address" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="city" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="zipcode" ESCAPE=JS -->'); return false;" value="Select"/>
80                     </form>
81                 </td>
82                         </tr>
83                 <!-- /TMPL_LOOP -->
84         </table>
85 <!--/TMPL_IF-->
86
87 <div id="closewindow"><a href="#" class="close">Cancel</a></div>
88 </div>
89 </div>
90 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->