- my ( $name, $authcat, $default ) = @_;
- my @authorised_values;
- my %authorised_lib;
- my $value;
- my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare(
- "SELECT authorised_value,lib
- FROM authorised_values
- WHERE category = ?
- ORDER BY lib"
- );
- $sth->execute( $authcat );
-
- push @authorised_values, '';
- while (my ($value, $lib) = $sth->fetchrow_array) {
- push @authorised_values, $value;
- $authorised_lib{$value} = $lib;
- }
-
- return 0 if keys(%authorised_lib) == 0;
-
- my $budget_authvalue_dropbox = CGI::scrolling_list(
- -values => \@authorised_values,
- -labels => \%authorised_lib,
- -default => $default,
- -override => 1,
- -size => 1,
- -multiple => 0,
- -name => $name,
- -id => $name,
+ my ( $authcat, $default ) = @_;
+ my $dbh = C4::Context->dbh;
+ my $sth = $dbh->prepare(
+ 'SELECT authorised_value,lib FROM authorised_values
+ WHERE category = ? ORDER BY lib'