Lines 100-119
if ($op eq 'add_form') {
Link Here
|
100 |
$sth->execute($searchfield,$authtypecode); |
100 |
$sth->execute($searchfield,$authtypecode); |
101 |
$data=$sth->fetchrow_hashref; |
101 |
$data=$sth->fetchrow_hashref; |
102 |
} |
102 |
} |
103 |
my $sth = $dbh->prepare("select distinct category from authorised_values"); |
103 |
|
104 |
$sth->execute; |
104 |
my @authorised_values = @{C4::Koha::GetAuthorisedValueCategories()}; # function returns array ref, dereferencing |
105 |
my @authorised_values; |
105 |
unshift @authorised_values, ""; # put empty value first |
106 |
push @authorised_values,""; |
106 |
my $authorised_value = { |
107 |
while ((my $category) = $sth->fetchrow_array) { |
107 |
values => \@authorised_values, |
108 |
push @authorised_values, $category; |
108 |
default => $data->{'authorised_value'}, |
109 |
} |
109 |
}; |
110 |
my $authorised_value = CGI::scrolling_list(-name=>'authorised_value', |
|
|
111 |
-id=>'authorised_value', |
112 |
-values=> \@authorised_values, |
113 |
-size=>1, |
114 |
-multiple=>0, |
115 |
-default => $data->{'authorised_value'}, |
116 |
); |
117 |
|
110 |
|
118 |
if ($searchfield) { |
111 |
if ($searchfield) { |
119 |
$template->param('searchfield' => $searchfield); |
112 |
$template->param('searchfield' => $searchfield); |