@@ -, +, @@ --- .../prog/en/modules/circ/request-article.tt | 38 ++++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt @@ -305,24 +305,26 @@ }); $(document).ready(function() { - $( "#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( "ui-autocomplete" )._renderItem = function( ul, item ) { - return $( "
  • " ) - .data( "ui-autocomplete-item", item ) - .append( "" + item.surname + ", " + item.firstname + - " (" + item.cardnumber + ") " + item.address + - " " + item.city + " " + item.zipcode + " " + - item.country + "" ) - .appendTo( ul ); - }; + [% UNLESS (patron ) %] + $( "#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( "ui-autocomplete" )._renderItem = function( ul, item ) { + return $( "
  • " ) + .data( "ui-autocomplete-item", item ) + .append( "" + item.surname + ", " + item.firstname + + " (" + item.cardnumber + ") " + item.address + + " " + item.city + " " + item.zipcode + " " + + item.country + "" ) + .appendTo( ul ); + }; + [% END %] $( ".ar-update-branchcode" ).on('focus', function(){ previous_branchcode = this.value; --