View | Details | Raw Unified | Return to bug 766
Collapse All | Expand All

(-)a/admin/marctagstructure.pl (-14 / +7 lines)
Lines 100-119 if ($op eq 'add_form') { Link Here
100
		$sth->execute($searchfield,$frameworkcode);
100
		$sth->execute($searchfield,$frameworkcode);
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
			-values=> \@authorised_values,
112
			-size=>1,
113
			-id=>"authorised_value",
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);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt (-2 / +11 lines)
Lines 92-98 $(document).ready(function() { Link Here
92
            <input type="checkbox" name="mandatory" id="mandatory" value="1" />
92
            <input type="checkbox" name="mandatory" id="mandatory" value="1" />
93
        [% END %]
93
        [% END %]
94
    </li>
94
    </li>
95
    <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>
95
    <li><label for="authorised_value">Authorized value: </label>
96
        <select name="authorised_value" id="authorised_value" size="1">
97
        [% FOREACH value IN authorised_value.values %]
98
        [% IF ( value == authorised_value.default ) %]
99
            <option value="[% value %]" selected="selected">[% value %]</option>
100
        [% ELSE %]
101
            <option value="[% value %]">[% value %]</option>
102
        [% END %]
103
        [% END %]
104
        </select>
105
        (if you select a value here, the indicators will be limited to the authorized value list)</li>
96
</ol></fieldset> 
106
</ol></fieldset> 
97
    <fieldset class="action">
107
    <fieldset class="action">
98
        <input type="submit" value="Save changes" />
108
        <input type="submit" value="Save changes" />
99
- 

Return to bug 766