Bug 25498: (follow-up) Change for autocomplete change of 30578
Test plan: Check if the patron search still works on the intranet shelves form when transferring ownership. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
443c71fa00
commit
dc5431c8ec
1 changed files with 6 additions and 15 deletions
|
@ -892,21 +892,12 @@
|
|||
|
||||
[% IF op == 'transfer' %]
|
||||
$(document).ready(function() {
|
||||
$('#find_patron').autocomplete({
|
||||
source: "/cgi-bin/koha/circ/ysearch.pl",
|
||||
minLength: 3,
|
||||
select: function( event, ui ) {
|
||||
$('#new_owner_name').html( ui.item.firstname + " " + ui.item.surname );
|
||||
$('#new_owner').val( ui.item.borrowernumber );
|
||||
$('#find_patron').val('').focus();
|
||||
return false;
|
||||
},
|
||||
}).data('ui-autocomplete')._renderItem = function( ul, item ) {
|
||||
return $('<li></li>')
|
||||
.data( 'ui-autocomplete-item', item )
|
||||
.append( '<a>' + item.surname + ', ' + item.firstname + '</a>' )
|
||||
.appendTo(ul);
|
||||
};
|
||||
patron_autocomplete( $("#find_patron"), { 'on-select-callback': function( event, ui ) {
|
||||
$('#new_owner_name').html( ui.item.firstname + " " + ui.item.surname );
|
||||
$('#new_owner').val( ui.item.patron_id );
|
||||
$('#find_patron').val('').focus();
|
||||
return false;
|
||||
}});
|
||||
|
||||
$('#transferform').submit(function() {
|
||||
if( $('#new_owner').val() == '' ) {
|
||||
|
|
Loading…
Reference in a new issue