|
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; |