Lines 155-161
sub generate_subfield_form {
Link Here
|
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}" ); |
157 |
my $attributes_no_value = qq(id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$subfield_data{maxlength}" ); |
158 |
my $attributes_no_value_textarea = qq(id="$subfield_data{id}" name="field_value" class="input_marceditor" rows="5" cols="64" ); |
|
|
159 |
|
158 |
|
160 |
# Getting list of subfields to keep when restricted editing is enabled |
159 |
# Getting list of subfields to keep when restricted editing is enabled |
161 |
my $subfieldsToAllowForRestrictedEditing = C4::Context->preference('SubfieldsToAllowForRestrictedEditing'); |
160 |
my $subfieldsToAllowForRestrictedEditing = C4::Context->preference('SubfieldsToAllowForRestrictedEditing'); |
Lines 236-242
sub generate_subfield_form {
Link Here
|
236 |
id => $subfield_data{id}, |
235 |
id => $subfield_data{id}, |
237 |
maxlength => $subfield_data{max_length}, |
236 |
maxlength => $subfield_data{max_length}, |
238 |
value => $value, |
237 |
value => $value, |
239 |
avalue => $authorised_lib{$value}, |
|
|
240 |
}; |
238 |
}; |
241 |
} |
239 |
} |
242 |
else { |
240 |
else { |
Lines 249-262
sub generate_subfield_form {
Link Here
|
249 |
}; |
247 |
}; |
250 |
# If we're on restricted editing, and our field is not in the list of subfields to allow, |
248 |
# If we're on restricted editing, and our field is not in the list of subfields to allow, |
251 |
# then it is read-only |
249 |
# then it is read-only |
252 |
if ( |
250 |
$subfield_data{marc_value}->{readonlyselect} = ( |
253 |
not $allowAllSubfields |
251 |
not $allowAllSubfields |
254 |
and $restrictededition |
252 |
and $restrictededition |
255 |
and !grep { $tag . '$' . $subfieldtag eq $_ } @subfieldsToAllow |
253 |
and !grep { $tag . '$' . $subfieldtag eq $_ } @subfieldsToAllow |
256 |
) { |
254 |
) ? 1: 0; |
257 |
$subfield_data{marc_value}->{readonly} ='readonly="readonly"', |
|
|
258 |
$subfield_data{marc_value}->{disabled} ='disabled="disabled"', |
259 |
} |
260 |
} |
255 |
} |
261 |
} |
256 |
} |
262 |
# it's a thesaurus / authority field |
257 |
# it's a thesaurus / authority field |
Lines 280-295
sub generate_subfield_form {
Link Here
|
280 |
id => $subfield_data{id}, tabloop => $loop_data }; |
275 |
id => $subfield_data{id}, tabloop => $loop_data }; |
281 |
$plugin->build( $pars ); |
276 |
$plugin->build( $pars ); |
282 |
if( !$plugin->errstr ) { |
277 |
if( !$plugin->errstr ) { |
283 |
#TODO Report 12176 will make this even better ! |
|
|
284 |
my $class= 'buttonDot'. ( $plugin->noclick? ' disabled': '' ); |
278 |
my $class= 'buttonDot'. ( $plugin->noclick? ' disabled': '' ); |
285 |
my $title= $plugin->noclick? 'No popup': 'Tag editor'; |
|
|
286 |
$subfield_data{marc_value} = { |
279 |
$subfield_data{marc_value} = { |
287 |
type => 'text_plugin', |
280 |
type => 'text_plugin', |
288 |
id => $subfield_data{id}, |
281 |
id => $subfield_data{id}, |
289 |
maxlength => $subfield_data{max_length}, |
282 |
maxlength => $subfield_data{max_length}, |
290 |
value => $value, |
283 |
value => $value, |
291 |
class => $class, |
284 |
class => $class, |
292 |
title => $title, |
285 |
nopopup => $plugin->noclick, |
293 |
javascript => $plugin->javascript, |
286 |
javascript => $plugin->javascript, |
294 |
}; |
287 |
}; |
295 |
} else { |
288 |
} else { |