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

(-)a/installer/data/mysql/atomicupdate/bug_33117.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "33117",
5
    description => "Patron checkout search not working if searching with second surname",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
10
        $dbh->do(q{INSERT INTO systempreferences (`variable`, `value`, `explanation`, `options`, `type`) VALUES
11
		('PatronAutoCompleteSearchMethod' , '1' , 'Allows staff to search for patrons using the method' , 'Starts with|Contains', 'YesNo'), 
12
		});
13
        # sysprefs
14
        say $out "Added new system preference 'PatronAutocompleteSearchMethod'";
15
    },
16
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (-2 / +2 lines)
Lines 78-88 Link Here
78
    $(document).ready(function(){
78
    $(document).ready(function(){
79
        [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
79
        [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
80
            if ( $("#findborrower").length ) {
80
            if ( $("#findborrower").length ) {
81
                patron_autocomplete($("#findborrower"), { 'link-to': 'circ' });
81
                patron_autocomplete($("#findborrower"), { 'link-to': 'circ' },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
82
            }
82
            }
83
        [% END %]
83
        [% END %]
84
        if ( $("#searchmember").length ) {
84
        if ( $("#searchmember").length ) {
85
            patron_autocomplete($("#searchmember"), { 'link-to': 'patron' });
85
            patron_autocomplete($("#searchmember"), { 'link-to': 'patron' },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
86
        }
86
        }
87
    });
87
    });
88
    </script>
88
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt (-1 / +1 lines)
Lines 347-353 Acquisitions &rsaquo; Koha Link Here
347
                        $("#find_patron").val('').focus();
347
                        $("#find_patron").val('').focus();
348
                        return false;
348
                        return false;
349
                    }
349
                    }
350
                });
350
                },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
351
                $("body").on("click",".removePatron",function(e){
351
                $("body").on("click",".removePatron",function(e){
352
                    e.preventDefault();
352
                    e.preventDefault();
353
                    var divid = $(this).parent().attr("id");
353
                    var divid = $(this).parent().attr("id");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-1 / +2 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE Koha %]
4
[% USE TablesSettings %]
5
[% USE TablesSettings %]
5
[% USE Branches %]
6
[% USE Branches %]
6
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
Lines 187-193 Link Here
187
                    $("#find_patron").val('').focus();
188
                    $("#find_patron").val('').focus();
188
                    return false;
189
                    return false;
189
                }
190
                }
190
            });
191
            },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
191
            $("body").on("click",".removePatron",function(e){
192
            $("body").on("click",".removePatron",function(e){
192
                e.preventDefault();
193
                e.preventDefault();
193
                var divid = $(this).parent().attr("id");
194
                var divid = $(this).parent().attr("id");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt (-1 / +1 lines)
Lines 655-661 Link Here
655
                        window.location.href = "/cgi-bin/koha/circ/curbside_pickups.pl?op=find-patron&borrowernumber=" + ui.item.patron_id;
655
                        window.location.href = "/cgi-bin/koha/circ/curbside_pickups.pl?op=find-patron&borrowernumber=" + ui.item.patron_id;
656
                        return false;
656
                        return false;
657
                    }
657
                    }
658
                });
658
                },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
659
            }
659
            }
660
660
661
            $("#pickup-tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
661
            $("#pickup-tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt (-1 / +2 lines)
Lines 1-4 Link Here
1
[% PROCESS 'i18n.inc' %]
1
[% PROCESS 'i18n.inc' %]
2
[% USE Koha %}
2
[% SET footerjs = 1 %]
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>[% IF course_name %] Edit [% course_name | html %] [% ELSE %] New course [% END %] &rsaquo; Course reserves &rsaquo; Koha</title>
5
<title>[% IF course_name %] Edit [% course_name | html %] [% ELSE %] New course [% END %] &rsaquo; Course reserves &rsaquo; Koha</title>
Lines 181-187 Link Here
181
                        AddInstructor( ui.item.surname + ", " + ui.item.firstname, ui.item.patron_id );
182
                        AddInstructor( ui.item.surname + ", " + ui.item.firstname, ui.item.patron_id );
182
                        return false;
183
                        return false;
183
                    }
184
                    }
184
                });
185
                },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
185
186
186
                if ( ! $('#instructors').html() ) {
187
                if ( ! $('#instructors').html() ) {
187
                    $('#course_instructors').hide();
188
                    $('#course_instructors').hide();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt (-1 / +2 lines)
Lines 1-5 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE KohaDates %]
4
[% USE KohaDates %]
4
[% USE TablesSettings %]
5
[% USE TablesSettings %]
5
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
Lines 267-273 Link Here
267
                    $("#find_patron").val('').focus();
268
                    $("#find_patron").val('').focus();
268
                    return false;
269
                    return false;
269
                }
270
                }
270
            });
271
            },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
271
            $("body").on("click",".removePatron",function(e){
272
            $("body").on("click",".removePatron",function(e){
272
                e.preventDefault();
273
                e.preventDefault();
273
                var divid = $(this).parent().attr("id");
274
                var divid = $(this).parent().attr("id");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +1 lines)
Lines 1680-1686 Link Here
1680
            Sticky.hcSticky({
1680
            Sticky.hcSticky({
1681
                stickTo: "#existing_holds",
1681
                stickTo: "#existing_holds",
1682
                stickyClass: "floating"
1682
                stickyClass: "floating"
1683
            });
1683
            },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
1684
1684
1685
            [% IF Koha.Preference('EnableItemGroupHolds') %]
1685
            [% IF Koha.Preference('EnableItemGroupHolds') %]
1686
                $(':radio[name="item_group_id"]').change(function(){
1686
                $(':radio[name="item_group_id"]').change(function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-1 / +1 lines)
Lines 961-967 Link Here
961
                    $('#new_owner').val( ui.item.patron_id );
961
                    $('#new_owner').val( ui.item.patron_id );
962
                    $('#find_patron').val('').focus();
962
                    $('#find_patron').val('').focus();
963
                    return false;
963
                    return false;
964
                }});
964
                }},'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
965
965
966
                $('#transferform').submit(function() {
966
                $('#transferform').submit(function() {
967
                    if( $('#new_owner').val() == '' ) {
967
                    if( $('#new_owner').val() == '' ) {
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js (-1 / +1 lines)
Lines 163-167 $(document).ready(function() { Link Here
163
            $("#approver").val( ui.item.patron_id );
163
            $("#approver").val( ui.item.patron_id );
164
            return false;
164
            return false;
165
        }
165
        }
166
    });
166
    },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
167
});
167
});
(-)a/koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js (-1 / +1 lines)
Lines 1-4 Link Here
1
function patron_autocomplete(node, options) {
1
function patron_autocomplete(node, options, search_type) {
2
    let link_to;
2
    let link_to;
3
    let url_params;
3
    let url_params;
4
    let on_select_callback;
4
    let on_select_callback;
(-)a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js (-2 / +1 lines)
Lines 148-152 $(document).ready(function(){ Link Here
148
            $("#user").val( ui.item.patron_id );
148
            $("#user").val( ui.item.patron_id );
149
            return false;
149
            return false;
150
        }
150
        }
151
    });
151
    },'[%Koha.Preference('PatronAutocompleteSearchMethod' | html %]');
152
});
152
});
153
- 

Return to bug 33117