+
+[% UNLESS ( borrowernumber || borrower_list ) %]
+ [% 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 $( "<li></li>" )
+ .data( "item.autocomplete", item )
+ .append( "<a>" + item.surname + ", " + item.firstname +
+ " (" + item.cardnumber + ") <small>" + item.address +
+ " " + item.city + " " + item.zipcode + " " +
+ item.country + "</small></a>" )
+ .appendTo( ul );
+ };
+ [% END %]
+[% END %]
+