@@ -, +, @@ - On a biblio record, go to the Holds tab, mine looks like /cgi-bin/koha/reserve/request.pl?biblionumber=2 - A search box is shown for patron searching. - Search for a patron: it works as usual. - Make sure CircAutocompl is 'Don\'t try' - Apply the patch - Click the Holds tab again, and do the same search: functionality should remain intact. - Change CircAutocompl to 'Try' - Click the Holds tab again - Autocomplete should show you the possible options, and once you choose one result, it should work as usual. --- .../prog/en/modules/reserve/request.tt | 38 ++++++++++++++++---- 1 files changed, 31 insertions(+), 7 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -130,6 +130,30 @@ function checkMultiHold() { }); $('#hold-request-form').preventDoubleFormSubmit(); + +[% UNLESS ( borrowernumber ) %] + [% IF ( CircAutocompl ) %] + $( "#patron" ).autocomplete({ + source: "/cgi-bin/koha/circ/ysearch.pl", + minLength: 3, + select: function( event, ui ) { + $( "#patron" ).val( ui.item.cardnumber ); + $( "#holds_patronsearch" ).submit(); + return false; + } + }) + .data( "autocomplete" )._renderItem = function( ul, item ) { + return $( "
  • " ) + .data( "item.autocomplete", item ) + .append( "" + item.surname + ", " + item.firstname + + " (" + item.cardnumber + ") " + item.address + + " " + item.city + " " + item.zipcode + " " + + item.country + "" ) + .appendTo( ul ); + }; + [% END %] +[% END %] + }); // ]]> @@ -176,15 +200,15 @@ function checkMultiHold() { [% IF ( messageborrower ) %]

    Patron Not Found

    No patron with this name, please, try another

    [% END %] -
    + [% UNLESS borrower_list %] -
    - -
    Enter patron card number or partial name:
    - - +
    + +
    Enter patron card number or partial name:
    + -
    + +
    [% ELSE %]