sub codes {
my ( $self, $params ) = @_;
return Koha::Patron::Attribute::Types->search($params)->get_column('code');
my @codes = Koha::Patron::Attribute::Types->search($params)->get_column('code');
return \@codes;
}
1;
}, {});
[% IF Koha.Preference('ExtendedPatronAttributes') %]
[% SET extended_attribute_types = [ ExtendedAttributeTypes.codes( staff_searchable => 1, searched_by_default => 1 ) ] %]
[% SET extended_attribute_types = ExtendedAttributeTypes.codes( staff_searchable => 1, searched_by_default => 1 ) %]
var extended_attribute_types = [% To.json(extended_attribute_types || []) | $raw %];
[% END %]
if (
typeof options !== "undefined" &&
((options.search_fields == "standard" &&
options.extended_attribute_types) ||
options.extended_attribute_types.length > 0) ||
searched_attribute_fields.length > 0) &&
extendedPatronAttributes
) {
-