- if ($attr_type->staff_searchable()) {
- $template->param(staff_searchable_checked => 1);
- }
- if ($attr_type->display_checkout()) {
- $template->param(display_checkout_checked => 'checked="checked"');
- }
- $template->param( authorised_value_category => $attr_type->authorised_value_category() );
- $template->param(classes_val_loop => GetAuthorisedValues( 'PA_CLASS' ));
-
- my $branches = Koha::Libraries->search( {}, { order_by => ['branchname'] } )->unblessed;
- my @branches_loop;
- my $selected_branches = $attr_type->branches;
- foreach my $branch (@$branches) {
- my $selected = ( grep {$_->{branchcode} eq $branch->{branchcode}} @$selected_branches ) ? 1 : 0;
- push @branches_loop, {
- branchcode => $branch->{branchcode},
- branchname => $branch->{branchname},
- selected => $selected,
- };
- }
- $template->param( branches_loop => \@branches_loop );
-
- $template->param(
- category_code => $attr_type->category_code,
- category_class => $attr_type->class,
- category_description => $attr_type->category_description,
- );
-
- my $patron_categories = Koha::Patron::Categories->search({}, {order_by => ['description']});