Koha/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc
Owen Leonard 3672df5226 Bug 20221: Fix for JavaScript error during checkout patron search
This patch fixes a bug caused by the changes in Bug 19641. JavaScript
embedded in circ-patron-search-results.inc executes before jQuery is
loaded.

This patch adds a separate javascript file which can be included both in
circulation.tt and request.tt since both use the same include.

To test, apply the patch and submit a patron name in the check out form.
On the page of search results, clicking a table row should work the same
as clicking the patron name link.

Perform the same test during the hold process: Locate and place a hold
on a title. In the patron search form, submit a patron name and test the
behavior of the search results screen.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:00:57 -03:00

31 lines
1.5 KiB
HTML

[% USE KohaDates %]
<legend>Patron selection</legend>
<table id="table_borrowers" class="table_borrowers">
<thead>
<tr>
<th>Name</th>
<th>Card number</th>
<th>Date of birth</th>
<th>Category</th>
<th>Library</th>
<th>Address</th>
</tr>
</thead>
<tbody>
[% FOREACH borrower IN borrowers %]
[% IF ( destination == "circ" ) %]
<tr class="clickable" data-url="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]">
<td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td>
[% ELSE %]
<tr class="clickable" data-url="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&amp;biblionumber=[% biblionumber %]">
<td><a href="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&amp;biblionumber=[% biblionumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td>
[% END %]
<td>[% borrower.cardnumber %]</td>
<td>[% borrower.dateofbirth | $KohaDates %]</td>
<td>[% Categories.GetName( borrower.categorycode ) %]</td>
<td>[% Branches.GetName( borrower.branchcode ) %]</td>
<td>[% borrower.address %]</td>
</tr>
[% END %]
</tbody>
</table>