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

(-)a/Koha/Template/Plugin/ExtendedAttributeTypes.pm (-1 / +4 lines)
Lines 33-39 sub all { Link Here
33
33
34
sub codes {
34
sub codes {
35
    my ( $self, $params ) = @_;
35
    my ( $self, $params ) = @_;
36
    return Koha::Patron::Attribute::Types->search($params)->get_column('code');
36
37
    my @codes = Koha::Patron::Attribute::Types->search($params)->get_column('code');
38
39
    return \@codes;
37
}
40
}
38
41
39
1;
42
1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-1 / +1 lines)
Lines 233-239 Link Here
233
        }, {});
233
        }, {});
234
234
235
        [% IF Koha.Preference('ExtendedPatronAttributes') %]
235
        [% IF Koha.Preference('ExtendedPatronAttributes') %]
236
            [% SET extended_attribute_types = [ ExtendedAttributeTypes.codes( staff_searchable => 1, searched_by_default => 1 ) ] %]
236
            [% SET extended_attribute_types = ExtendedAttributeTypes.codes( staff_searchable => 1, searched_by_default => 1 ) %]
237
            let extended_attribute_types = [% To.json(extended_attribute_types || []) | $raw %];
237
            let extended_attribute_types = [% To.json(extended_attribute_types || []) | $raw %];
238
        [% END %]
238
        [% END %]
239
239
(-)a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js (-2 / +1 lines)
Lines 650-656 function buildPatronSearchQuery(term, options) { Link Here
650
    q.push({ "-or": term_subquery_or });
650
    q.push({ "-or": term_subquery_or });
651
651
652
    // Add each pattern for each extended patron attributes
652
    // Add each pattern for each extended patron attributes
653
    if ( typeof options !== 'undefined' && ( (options.search_fields == 'standard' && options.extended_attribute_types) || ( searched_attribute_fields.length > 0 ) ) && extendedPatronAttributes) {
653
    if ( typeof options !== 'undefined' && ( (options.search_fields == 'standard' && options.extended_attribute_types.length > 0) || ( searched_attribute_fields.length > 0 ) ) && extendedPatronAttributes) {
654
        extended_attribute_codes_to_search = (searched_attribute_fields.length > 0) ? searched_attribute_fields : options.extended_attribute_types;
654
        extended_attribute_codes_to_search = (searched_attribute_fields.length > 0) ? searched_attribute_fields : options.extended_attribute_types;
655
        extended_attribute_subquery_and = [];
655
        extended_attribute_subquery_and = [];
656
        patterns.forEach(function (pattern, i) {
656
        patterns.forEach(function (pattern, i) {
657
- 

Return to bug 36025