--- a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js
@@ -95,8 +95,32 @@ $(document).ready(function(){
$("#patronImageEdit .modal-title").text(modalTitle);
$("#patronImageEdit").modal("show");
});
+
+ var obj = $( "#searchmember" ).autocomplete({
+ source: "/cgi-bin/koha/circ/ysearch.pl",
+ minLength: 3,
+ select: function( event, ui ) {
+ window.location.href = ui.item.link;
+ }
+ }).data( "ui-autocomplete" );
+ if( obj ) {
+ obj._renderItem = function( ul, item ) {
+ item.link = "/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber;
+ 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 + cardnumber + " " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" )
+ .appendTo( ul );
+ };
+ }
});
+
+
function searchfield_date_tooltip(filter) {
var field = "#searchmember" + filter;
var type = "#searchfieldstype" + filter;
--