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

(-)a/cataloguing/additem.pl (-12 lines)
Lines 154-160 sub generate_subfield_form { Link Here
154
	    my $input = new CGI;
154
	    my $input = new CGI;
155
	    $value = $input->param('barcode');
155
	    $value = $input->param('barcode');
156
	}
156
	}
157
        my $attributes_no_value = qq(id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$subfield_data{maxlength}" );
158
157
159
        # Getting list of subfields to keep when restricted editing is enabled
158
        # Getting list of subfields to keep when restricted editing is enabled
160
        my $subfieldsToAllowForRestrictedEditing = C4::Context->preference('SubfieldsToAllowForRestrictedEditing');
159
        my $subfieldsToAllowForRestrictedEditing = C4::Context->preference('SubfieldsToAllowForRestrictedEditing');
Lines 164-180 sub generate_subfield_form { Link Here
164
        ) ? 1 : 0;
163
        ) ? 1 : 0;
165
        my @subfieldsToAllow = split(/ /, $subfieldsToAllowForRestrictedEditing);
164
        my @subfieldsToAllow = split(/ /, $subfieldsToAllowForRestrictedEditing);
166
165
167
        # If we're on restricted editing, and our field is not in the list of subfields to allow,
168
        # then it is read-only
169
        $attributes_no_value .= 'readonly="readonly" '
170
            if (
171
                not $allowAllSubfields
172
                and $restrictededition
173
                and !grep { $tag . '$' . $subfieldtag  eq $_ } @subfieldsToAllow
174
            );
175
176
        my $attributes          = qq($attributes_no_value value="$value" );
177
        
178
        if ( $subfieldlib->{authorised_value} ) {
166
        if ( $subfieldlib->{authorised_value} ) {
179
            my @authorised_values;
167
            my @authorised_values;
180
            my %authorised_lib;
168
            my %authorised_lib;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-3 / +2 lines)
Lines 231-239 $(document).ready(function() { Link Here
231
                    <input type="hidden" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]">
231
                    <input type="hidden" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]">
232
                [% ELSIF ( mv.type == 'select' ) %]
232
                [% ELSIF ( mv.type == 'select' ) %]
233
                    [% IF ( mv.readonlyselect ) %]
233
                    [% IF ( mv.readonlyselect ) %]
234
                        <select name="[%- mv.name -%]" id="[%- mv.id -%]" size="1" class="input_marceditor" readonly="readonly" disabled="disabled">
234
                        <select name="field_value" id="[%- mv.id -%]" size="1" class="input_marceditor" readonly="readonly" disabled="disabled">
235
                    [% ELSE %]
235
                    [% ELSE %]
236
                        <select name="[%- mv.name -%]" id="[%- mv.id -%]" size="1" class="input_marceditor">
236
                        <select name="field_value" id="[%- mv.id -%]" size="1" class="input_marceditor">
237
                    [% END %]
237
                    [% END %]
238
                    [% FOREACH aval IN mv.values %]
238
                    [% FOREACH aval IN mv.values %]
239
                        [% IF aval == mv.default %]
239
                        [% IF aval == mv.default %]
240
- 

Return to bug 12176