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

(-)a/installer/data/mysql/atomicupdate/bug_33117.pl (-1 / +1 lines)
Lines 8-14 return { Link Here
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
9
        # Do you stuffs here
10
        $dbh->do(q{INSERT INTO systempreferences (`variable`,`value`,`explanation`,`options`,`type`) VALUES
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'});
11
                ('PatronAutoCompleteSearchMethod','starts_with','Allows staff to set a default method when searching for patrons with autocomplete','starts_with|contains','Choice');
12
12
13
                say $out "Added new system preference 'PatronAutoCompleteSearchMethod'";
13
                say $out "Added new system preference 'PatronAutoCompleteSearchMethod'";
14
                },
14
                },
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 555-561 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
555
('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo'),
555
('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo'),
556
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
556
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
557
('PatronAutoComplete','1','Try|Don\'t try','to guess the patron being entered while typing a patron search for circulation or patron search. Only returns the first 10 results at a time.','YesNo'),
557
('PatronAutoComplete','1','Try|Don\'t try','to guess the patron being entered while typing a patron search for circulation or patron search. Only returns the first 10 results at a time.','YesNo'),
558
('PatronAutoCompleteSearchMethod','1','Allows staff to search for patrons using the method','Starts with|Contains','YesNo'),
558
('PatronAutoCompleteSearchMethod','starts_with','Choose which search method to use by default when searching with Patron autocomplete','starts_with|choice','Choice'),
559
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
559
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
560
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
560
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
561
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
561
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (-1 / +1 lines)
Lines 71-77 Link Here
71
71
72
<script>
72
<script>
73
    var defaultPatronSearchFields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' | html %]";
73
    var defaultPatronSearchFields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' | html %]";
74
    var patronAutoCompleteSearchMethod = "[% Koha.Preference('PatronAutoCompleteSearchMethod') || 'startsWith' %]";
74
    var patronAutoCompleteSearchMethod = "[% Koha.Preference('PatronAutoCompleteSearchMethod') || 'contains' | html %]";
75
    var loggedInLibrary = '[% Branches.GetLoggedInBranchcode | html %]';
75
    var loggedInLibrary = '[% Branches.GetLoggedInBranchcode | html %]';
76
    var singleBranchMode = '[% singleBranchMode | html %]';
76
    var singleBranchMode = '[% singleBranchMode | html %]';
77
</script>
77
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-4 / +4 lines)
Lines 27-36 Circulation: Link Here
27
            - to guess the patron being entered while typing a patron search for circulation or patron search.
27
            - to guess the patron being entered while typing a patron search for circulation or patron search.
28
            - Only returns the first 10 results at a time.
28
            - Only returns the first 10 results at a time.
29
        -
29
        -
30
           - pref: PatronAutoCompleteSearchMethod
30
            - pref: PatronAutoCompleteSearchMethod
31
             choices:
31
              choices:
32
                 1: Starts with
32
                  1: Starts with
33
                 0: "Contains"
33
                  0: "Contains"
34
            - Enable this search method to determine whether to use Starts with or Contains for autocomplete patron searches.
34
            - Enable this search method to determine whether to use Starts with or Contains for autocomplete patron searches.
35
        -
35
        -
36
            - pref: itemBarcodeInputFilter
36
            - pref: itemBarcodeInputFilter
(-)a/koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js (-2 / +1 lines)
Lines 2-8 function patron_autocomplete(node, options) { Link Here
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;
5
    let leading_wildcard = patronAutoCompleteSearchMethod === '1' ? '%' : '';
5
    let leading_wildcard = patronAutoCompleteSearchMethod === 'contains' ? '%' : '';
6
    if ( options ) {
6
    if ( options ) {
7
        if ( options['link-to'] ) {
7
        if ( options['link-to'] ) {
8
            link_to = options['link-to'];
8
            link_to = options['link-to'];
9
- 

Return to bug 33117