Lines 892-912
Link Here
|
892 |
|
892 |
|
893 |
[% IF op == 'transfer' %] |
893 |
[% IF op == 'transfer' %] |
894 |
$(document).ready(function() { |
894 |
$(document).ready(function() { |
895 |
$('#find_patron').autocomplete({ |
895 |
patron_autocomplete( $("#find_patron"), { 'on-select-callback': function( event, ui ) { |
896 |
source: "/cgi-bin/koha/circ/ysearch.pl", |
896 |
$('#new_owner_name').html( ui.item.firstname + " " + ui.item.surname ); |
897 |
minLength: 3, |
897 |
$('#new_owner').val( ui.item.patron_id ); |
898 |
select: function( event, ui ) { |
898 |
$('#find_patron').val('').focus(); |
899 |
$('#new_owner_name').html( ui.item.firstname + " " + ui.item.surname ); |
899 |
return false; |
900 |
$('#new_owner').val( ui.item.borrowernumber ); |
900 |
}}); |
901 |
$('#find_patron').val('').focus(); |
|
|
902 |
return false; |
903 |
}, |
904 |
}).data('ui-autocomplete')._renderItem = function( ul, item ) { |
905 |
return $('<li></li>') |
906 |
.data( 'ui-autocomplete-item', item ) |
907 |
.append( '<a>' + item.surname + ', ' + item.firstname + '</a>' ) |
908 |
.appendTo(ul); |
909 |
}; |
910 |
|
901 |
|
911 |
$('#transferform').submit(function() { |
902 |
$('#transferform').submit(function() { |
912 |
if( $('#new_owner').val() == '' ) { |
903 |
if( $('#new_owner').val() == '' ) { |
913 |
- |
|
|