Lines 2397-2402
sub PrepareItemrecordDisplay {
Link Here
|
2397 |
-tabindex => '', |
2397 |
-tabindex => '', |
2398 |
-multiple => 0, |
2398 |
-multiple => 0, |
2399 |
); |
2399 |
); |
|
|
2400 |
} elsif ( $tagslib->{$tag}->{$subfield}->{value_builder} ) { |
2401 |
# opening plugin |
2402 |
my $plugin = C4::Context->intranetdir . "/cataloguing/value_builder/" . $tagslib->{$tag}->{$subfield}->{'value_builder'}; |
2403 |
if (do $plugin) { |
2404 |
my $temp; |
2405 |
my $extended_param = plugin_parameters( $dbh, $temp, $tagslib, $subfield_data{id}, undef ); |
2406 |
my ( $function_name, $javascript ) = plugin_javascript( $dbh, $temp, $tagslib, $subfield_data{id}, undef ); |
2407 |
$subfield_data{random} = int(rand(1000000)); # why do we need 2 different randoms? |
2408 |
my $index_subfield = int(rand(1000000)); |
2409 |
$subfield_data{id} = "tag_".$tag."_subfield_".$subfield."_".$index_subfield; |
2410 |
$subfield_data{marc_value} = qq[<input tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" |
2411 |
onfocus="Focus$function_name($subfield_data{random}, '$subfield_data{id}');" |
2412 |
onblur=" Blur$function_name($subfield_data{random}, '$subfield_data{id}');" /> |
2413 |
<a href="#" class="buttonDot" onclick="Clic$function_name('$subfield_data{id}'); return false;" title="Tag Editor">...</a> |
2414 |
$javascript]; |
2415 |
} else { |
2416 |
warn "Plugin Failed: $plugin"; |
2417 |
$subfield_data{marc_value} = qq(<input tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" />); # supply default input form |
2418 |
} |
2419 |
} |
2420 |
elsif ( $tag eq '' ) { # it's an hidden field |
2421 |
$subfield_data{marc_value} = qq(<input type="hidden" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" value="$defaultvalue" />); |
2422 |
} |
2423 |
elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) { # FIXME: shouldn't input type be "hidden" ? |
2424 |
$subfield_data{marc_value} = qq(<input type="text" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" value="$defaultvalue" />); |
2425 |
} |
2426 |
elsif ( length($defaultvalue) > 100 |
2427 |
or (C4::Context->preference("marcflavour") eq "UNIMARC" and |
2428 |
300 <= $tag && $tag < 400 && $subfield eq 'a' ) |
2429 |
or (C4::Context->preference("marcflavour") eq "MARC21" and |
2430 |
500 <= $tag && $tag < 600 ) |
2431 |
) { |
2432 |
# oversize field (textarea) |
2433 |
$subfield_data{marc_value} = qq(<textarea tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255">$defaultvalue</textarea>\n"); |
2400 |
} else { |
2434 |
} else { |
2401 |
$subfield_data{marc_value} = "<input type=\"text\" name=\"field_value\" value=\"$defaultvalue\" size=\"50\" maxlength=\"255\" />"; |
2435 |
$subfield_data{marc_value} = "<input type=\"text\" name=\"field_value\" value=\"$defaultvalue\" size=\"50\" maxlength=\"255\" />"; |
2402 |
} |
2436 |
} |
2403 |
- |
|
|