Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tt
Katrin Fischer bae9aacb3f Bug 2780 - Capitalize strings consistently (members)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
2012-04-10 10:04:09 +02:00

120 lines
4.7 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Guarantor search</title>
[% INCLUDE 'doc-head-close.inc' %]
<style type="text/css">
#custom-doc { width:44.46em;*width:43.39em;min-width:578px; margin:auto; text-align:left; }
</style>
<script type="text/javascript">
<!--
function fillguarantor(id) {
var $ = window.$;
var surname = $('#' + id + 'surname').text();
var firstname = $('#' + id + 'firstname').text();
var streetnumber = $('#' + id + 'streetnumber').text();
var address = $('#' + id + 'address').text();
var address2 = $('#' + id + 'address2').text();
var city = $('#' + id + 'city').text();
var state = $('#' + id + 'state').text();
var zipcode = $('#' + id + 'zipcode').text();
var country = $('#' + id + 'country').text();
var branchcode = $('#' + id + 'branchcode').text();
var $ = window.opener.$;
var form = $('#entryform').get(0);
if (form.guarantorid.value) {
$("#contact-details").find('a').remove();
$("#contactname, #contactfirstname").parent().find('span').remove();
}
form.guarantorid.value = id;
$('#contact-details')
.show()
.find('span')
.after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>');
$(form.contactname)
.val(surname)
.before('<span>' + surname + '</span>').get(0).type = 'hidden';
$(form.contactfirstname)
.val(firstname)
.before('<span>' + firstname + '</span>').get(0).type = 'hidden';
form.streetnumber.value = streetnumber;
form.address.value = address;
form.address2.value = address2;
form.city.value = city;
form.state.value = state;
form.zipcode.value = zipcode;
form.country.value = country;
form.branchcode.value = branchcode;
form.guarantorsearch.value = 'Change';
self.close();
}
// -->
</script>
</head>
<body id="pat_guarantor_search" class="pat">
<div id="custom-doc" class="yui-t7">
<div id="bd">
<div class="yui-g">
<h3>Search for guarantor</h3>
<form action="/cgi-bin/koha/members/guarantor_search.pl" method="post">
<fieldset>
<input type="hidden" name="category_type" id="category_type" value="[% category_type %]" />
<input type="text" name="member" id="member" value="[% member %]" class="focus" /> Ordered by
<select name="orderby">
<option value="surname,firstname">Surname</option>
<option value="cardnumber">Card number</option>
</select> <input type="submit" class="button" value="Search" /></fieldset>
</form>
[% IF ( results ) %]
<p>Searched for <span class="ex">[% member %]</span>, [% numresults %] patron(s) found:</p>
<table>
<tr>
<th>Card number</th>
<th>Name</th>
<th>Date of birth</th>
<th>Address</th>
<th>Select?</th>
</tr>
[% FOREACH resultsloo IN resultsloop %]
[% import(resultsloo) %]
<tr>
<td>[% cardnumber %]</td>
<td>
[% surname %], [% firstname %]
</td>
<td>[% dateofbirth %]</td>
<td><p>[% address %] [% address2 %] [% city %] [% state %] [% zipcode %] [% country %]</p></td>
<td>
<span style="display:none;">
<span id="[% borrowernumber %]surname">[% surname %]</span>
<span id="[% borrowernumber %]firstname">[% firstname %]</span>
<span id="[% borrowernumber %]streetnumber">[% streetnumber %]</span>
<span id="[% borrowernumber %]address">[% address %]</span>
<span id="[% borrowernumber %]address2">[% address2 %]</span>
<span id="[% borrowernumber %]city">[% city %]</span>
<span id="[% borrowernumber %]state">[% state %]</span>
<span id="[% borrowernumber %]zipcode">[% zipcode %]</span>
<span id="[% borrowernumber %]country">[% country %]</span>
<span id="[% borrowernumber %]branchcode">[% branchcode %]</span>
</span>
<form action="">
<input type="button" onclick="fillguarantor('[% borrowernumber %]'); return false;" value="Select"/>
</form>
</td>
</tr>
[% END %]
</table>
[% END %]
<div id="closewindow"><a href="#" class="close">Cancel</a></div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]