@@ -, +, @@ auth_tag_structure.pl --- admin/auth_tag_structure.pl | 21 +++++++-------------- .../prog/en/modules/admin/auth_tag_structure.tt | 18 +++++++++++++++--- 2 files changed, 22 insertions(+), 17 deletions(-) --- a/admin/auth_tag_structure.pl +++ a/admin/auth_tag_structure.pl @@ -100,20 +100,13 @@ if ($op eq 'add_form') { $sth->execute($searchfield,$authtypecode); $data=$sth->fetchrow_hashref; } - my $sth = $dbh->prepare("select distinct category from authorised_values"); - $sth->execute; - my @authorised_values; - push @authorised_values,""; - while ((my $category) = $sth->fetchrow_array) { - push @authorised_values, $category; - } - my $authorised_value = CGI::scrolling_list(-name=>'authorised_value', - -id=>'authorised_value', - -values=> \@authorised_values, - -size=>1, - -multiple=>0, - -default => $data->{'authorised_value'}, - ); + + my @authorised_values = @{C4::Koha::GetAuthorisedValueCategories()}; # function returns array ref, dereferencing + unshift @authorised_values, ""; # put empty value first + my $authorised_value = { + values => \@authorised_values, + default => $data->{'authorised_value'}, + }; if ($searchfield) { $template->param('searchfield' => $searchfield); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -108,9 +108,21 @@ [% ELSE %] [% END %] - -
  • [% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)
  • - + +
  • + + (if you select a value here, the indicators will be limited to the authorized value list) +
  • + +
    Cancel --