View | Details | Raw Unified | Return to bug 21076
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt (-19 / +20 lines)
Lines 305-328 Link Here
305
        });
305
        });
306
306
307
        $(document).ready(function() {
307
        $(document).ready(function() {
308
            $( "#patron" ).autocomplete({
308
            [% UNLESS (patron ) %]
309
                source: "/cgi-bin/koha/circ/ysearch.pl",
309
                $( "#patron" ).autocomplete({
310
                minLength: 3,
310
                    source: "/cgi-bin/koha/circ/ysearch.pl",
311
                select: function( event, ui ) {
311
                    minLength: 3,
312
                    $( "#patron" ).val( ui.item.cardnumber );
312
                    select: function( event, ui ) {
313
                    $( "#holds_patronsearch" ).submit();
313
                        $( "#patron" ).val( ui.item.cardnumber );
314
                    return false;
314
                        $( "#holds_patronsearch" ).submit();
315
                }
315
                        return false;
316
            })
316
                    }
317
            .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
317
                })
318
                return $( "<li></li>" )
318
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
319
                .data( "ui-autocomplete-item", item )
319
                    return $( "<li></li>" )
320
                .append( "<a>" + item.surname + ", " + item.firstname +
320
                    .data( "ui-autocomplete-item", item )
321
                         " (" + item.cardnumber + ") <small>" + item.address +
321
                    .append( "<a>" + item.surname + ", " + item.firstname +
322
                         " " + item.city + " " + item.zipcode + " " +
322
                             " (" + item.cardnumber + ") <small>" + item.address +
323
                         item.country + "</small></a>" )
323
                             " " + item.city + " " + item.zipcode + " " +
324
                .appendTo( ul );
324
                             item.country + "</small></a>" )
325
            };
325
                    .appendTo( ul );
326
                };
327
            [% END %]
326
328
327
            $( ".ar-update-branchcode" ).on('focus', function(){
329
            $( ".ar-update-branchcode" ).on('focus', function(){
328
                previous_branchcode = this.value;
330
                previous_branchcode = this.value;
329
- 

Return to bug 21076