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

(-)a/installer/data/mysql/atomicupdate/bug_29822.pl (-2 / +4 lines)
Lines 8-20 return { Link Here
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
9
10
        # Do you stuffs here
10
        # Do you stuffs here
11
        $dbh->do(q{
11
        $dbh->do(
12
            q{
12
            UPDATE systempreferences
13
            UPDATE systempreferences
13
            SET
14
            SET
14
              value = REPLACE( value, ',', '|' )
15
              value = REPLACE( value, ',', '|' )
15
            WHERE
16
            WHERE
16
              variable = 'DefaultPatronSearchFields'
17
              variable = 'DefaultPatronSearchFields'
17
        });
18
        }
19
        );
18
        say $out "Updated system preference 'DefaultPatronSearchFields";
20
        say $out "Updated system preference 'DefaultPatronSearchFields";
19
    },
21
    },
20
};
22
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc (-6 / +4 lines)
Lines 87-98 Link Here
87
        <select name="searchfieldstype" id="searchfieldstype_filter">
87
        <select name="searchfieldstype" id="searchfieldstype_filter">
88
    [% END %]
88
    [% END %]
89
        [% SET standard = Koha.Preference('DefaultPatronSearchFields') || 'firstname|middle_name|surname|othernames|cardnumber|userid' %]
89
        [% SET standard = Koha.Preference('DefaultPatronSearchFields') || 'firstname|middle_name|surname|othernames|cardnumber|userid' %]
90
        [% standard.replace('|', ',') %]
90
        [% SET full_address = 'streetnumber|streettype|address|address2|city|state|zipcode|country' %]
91
        [% SET full_address = 'streetnumber,streettype,address,address2,city,state,zipcode,country' %]
91
        [% SET all_emails = 'email|emailpro|B_email' %]
92
        [% SET all_emails = 'email,emailpro,B_email' %]
92
        [% SET all_phones = 'phone|phonepro|B_phone|altcontactphone|mobile' %]
93
        [% SET all_phones = 'phone,phonepro,B_phone,altcontactphone,mobile' %]
94
        [% default_fields = [ standard, 'surname', 'cardnumber', all_emails, 'borrowernumber', 'userid', all_phones, full_address, 'dateofbirth', 'sort1', 'sort2' ] %]
93
        [% default_fields = [ standard, 'surname', 'cardnumber', all_emails, 'borrowernumber', 'userid', all_phones, full_address, 'dateofbirth', 'sort1', 'sort2' ] %]
95
        [% search_options = default_fields.merge(standard.split(',')).unique %]
94
        [% search_options = default_fields.merge(standard.split('\|')).unique %]
96
        [% FOREACH s_o IN search_options %]
95
        [% FOREACH s_o IN search_options %]
97
            [% display_name = PROCESS patron_fields name=s_o %]
96
            [% display_name = PROCESS patron_fields name=s_o %]
98
            [% NEXT IF !display_name %]
97
            [% NEXT IF !display_name %]
99
- 

Return to bug 29822