comma fix
[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, surname, firstname, streetnumber, address, address2, city, state, zipcode, country) {
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.address2.value = address2;
34             form.city.value = city;
35             form.state.value = state;
36             form.zipcode.value = zipcode;
37             form.country.value = country;
38
39             form.guarantorsearch.value = 'Change';
40             self.close();
41         }
42         // -->
43     </script>
44 </head>
45
46 <div id="custom-doc" class="yui-t7">
47    <div id="bd">
48         <div class="yui-g">
49         
50
51 <h3>Search for guarantor</h3>
52         <form action="/cgi-bin/koha/members/guarantor_search.pl" method="post">
53                 <fieldset>
54                 <input type="hidden" name="category_type" id="category_type" value="[% category_type %]" />
55                 <input type="text" name="member" id="member" value="[% member %]" class="focus" /> Ordered by
56                 <select name="orderby">
57                         <option value="surname,firstname">Surname</option>
58                         <option value="cardnumber">Cardnumber</option>
59                 </select> <input type="submit" class="button" value="Search" /></fieldset>
60         </form>
61
62 [% IF ( results ) %]
63         <p>Searched for <span class="ex">[% member %]</span>, [% numresults %] patron(s) found:</p>
64         <table>
65                 <tr>
66                         <th>Cardnumber</th>
67                         <th>Name</th>
68                         <th>Date of birth</th>
69                         <th>Address</th>
70             <th>Select?</th>
71                 </tr>
72                 [% FOREACH resultsloo IN resultsloop %]
73                         <tr>
74                                 <td>[% resultsloo.cardnumber %]</td>
75                 <td>
76                     [% resultsloo.surname %], [% resultsloo.firstname %]
77                 </td> 
78                                 <td>[% resultsloo.dateofbirth %]</td>
79                                 <td><p>[% resultsloo.address %] [% resultsloo.address2 %] [% resultsloo.city %] [% resultsloo.state %] [% resultsloo.zipcode %] [% resultsloo.country %]</p></td>
80                 <td>
81                     <form action="">
82                         <input type="button" onclick="fillguarantor('[% resultsloo.borrowernumber %]', '[% resultsloo.surname |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.firstname |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.streetnumber |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.address |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.address2 |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.city |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.state |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.zipcode |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.country |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]'); return false;" value="Select"/>
83                     </form>
84                 </td>
85                         </tr>
86                 [% END %]
87         </table>
88 [% END %]
89
90 <div id="closewindow"><a href="#" class="close">Cancel</a></div>
91 </div>
92 </div>
93 [% INCLUDE 'intranet-bottom.inc' %]