- $template->param( CAT_LOOP => &catcode_aref);
- my @branchloop;
- foreach (sort {$branches->{$a}->{branchname} cmp $branches->{$b}->{branchname}} keys %$branches) {
- my $line = {branchcode => $_, branchname => $branches->{$_}->{branchname} || 'UNKNOWN'};
- $line->{selected} = 'selected' if ($selected_branch and $selected_branch eq $_);
- push @branchloop, $line;
- }
- $template->param(BRANCH_LOOP => \@branchloop);
+ my $patron_categories = Koha::Patron::Categories->search({}, {order_by => ['description']});
+ $template->param( patron_categories => $patron_categories );