Bug 766: Remove CGI::scrollinglist from marctagstructure.pl
This patch removes the only instance in this file. Don't know if the feature is of some utility, seems that does not work (no use of auth values as indicators on MARC editor) To test: 1. Apply the patch 2. Go to Administration > MARC frameworks 3. Clic on MARC structure of any fw 4. Clic Edit on any tag 5. On tag editor check the pulldown 'Authorised value', that was replaced 6. Check for regressions: select a value, save, verify the value, change again, etc. Note: removed a SELECT, using now C4::Koha::GetAuthorisedValueCategories Do not we need an AuthorisedValues.pm? (on C4 or Koha) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, passes tests and QA script. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
5b72546ffb
commit
de7dd39583
2 changed files with 18 additions and 15 deletions
|
@ -100,20 +100,13 @@ if ($op eq 'add_form') {
|
||||||
$sth->execute($searchfield,$frameworkcode);
|
$sth->execute($searchfield,$frameworkcode);
|
||||||
$data=$sth->fetchrow_hashref;
|
$data=$sth->fetchrow_hashref;
|
||||||
}
|
}
|
||||||
my $sth = $dbh->prepare("select distinct category from authorised_values");
|
|
||||||
$sth->execute;
|
my @authorised_values = @{C4::Koha::GetAuthorisedValueCategories()}; # function returns array ref, dereferencing
|
||||||
my @authorised_values;
|
unshift @authorised_values, ""; # put empty value first
|
||||||
push @authorised_values,"";
|
my $authorised_value = {
|
||||||
while ((my $category) = $sth->fetchrow_array) {
|
values => \@authorised_values,
|
||||||
push @authorised_values, $category;
|
default => $data->{'authorised_value'},
|
||||||
}
|
};
|
||||||
my $authorised_value = CGI::scrolling_list(-name=>'authorised_value',
|
|
||||||
-values=> \@authorised_values,
|
|
||||||
-size=>1,
|
|
||||||
-id=>"authorised_value",
|
|
||||||
-multiple=>0,
|
|
||||||
-default => $data->{'authorised_value'},
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($searchfield) {
|
if ($searchfield) {
|
||||||
$template->param(searchfield => $searchfield);
|
$template->param(searchfield => $searchfield);
|
||||||
|
|
|
@ -92,7 +92,17 @@ $(document).ready(function() {
|
||||||
<input type="checkbox" name="mandatory" id="mandatory" value="1" />
|
<input type="checkbox" name="mandatory" id="mandatory" value="1" />
|
||||||
[% END %]
|
[% END %]
|
||||||
</li>
|
</li>
|
||||||
<li><label for="authorised_value">Authorized value: </label>[% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)</li>
|
<li><label for="authorised_value">Authorized value: </label>
|
||||||
|
<select name="authorised_value" id="authorised_value" size="1">
|
||||||
|
[% FOREACH value IN authorised_value.values %]
|
||||||
|
[% IF ( value == authorised_value.default ) %]
|
||||||
|
<option value="[% value %]" selected="selected">[% value %]</option>
|
||||||
|
[% ELSE %]
|
||||||
|
<option value="[% value %]">[% value %]</option>
|
||||||
|
[% END %]
|
||||||
|
[% END %]
|
||||||
|
</select>
|
||||||
|
(if you select a value here, the indicators will be limited to the authorized value list)</li>
|
||||||
</ol></fieldset>
|
</ol></fieldset>
|
||||||
<fieldset class="action">
|
<fieldset class="action">
|
||||||
<input type="submit" value="Save changes" />
|
<input type="submit" value="Save changes" />
|
||||||
|
|
Loading…
Reference in a new issue