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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-2 / +2 lines)
Lines 430-436 Link Here
430
                    "dataSrc": function ( json ) {
430
                    "dataSrc": function ( json ) {
431
                        [% IF redirect_if_one_result %]
431
                        [% IF redirect_if_one_result %]
432
                            // redirect if there is only 1 result.
432
                            // redirect if there is only 1 result.
433
                            if ( first_draw && json.recordsFiltered == 1 ) {
433
                            // Do not redirect if state has been loaded
434
                            if ( !loaded_from_state && first_draw && json.recordsFiltered == 1 ) {
434
                                let url = '[% redirect_url | url %]'.indexOf("?") != -1
435
                                let url = '[% redirect_url | url %]'.indexOf("?") != -1
435
                                    ? '[% redirect_url | url %]&borrowernumber=' + json.data[0].patron_id
436
                                    ? '[% redirect_url | url %]&borrowernumber=' + json.data[0].patron_id
436
                                    : '[% redirect_url | url %]?borrowernumber=' + json.data[0].patron_id;
437
                                    : '[% redirect_url | url %]?borrowernumber=' + json.data[0].patron_id;
437
- 

Return to bug 33484