@@ -, +, @@ if cardnumber is empty - From the circulation home page, type a patron name in the "Check out" form and wait for autocomplete search results to display. - Patrons with a card number should be listed in the format: Surname, First name (Card number) Address. - Patrons without a card number should be listed as: Surname, First name Address. - Clicking on either kind of result should link you the checkout screen for that patron. --- koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -87,17 +87,17 @@ var obj = $( "#findborrower" ).autocomplete({ source: "/cgi-bin/koha/circ/ysearch.pl", minLength: 3, - select: function( event, ui ) { - $( "#findborrower" ).val( ui.item.cardnumber ); - $("#patronsearch").submit(); - return false; - } }).data( "ui-autocomplete" ); if( obj ) { obj._renderItem = function( ul, item ) { + var cardnumber = ""; + if( item.cardnumber != "" ){ + // Display card number in parentheses if it exists + cardnumber = " (" + item.cardnumber + ") "; + } return $( "
  • " ) .data( "ui-autocomplete-item", item ) - .append( "" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) + .append( "" + item.surname + ", " + item.firstname + cardnumber + " " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) .appendTo( ul ); }; } --