Bug 7355 Note subfields are not displayed in TEXTAREA if hidden

In the data entry form, there is a (hidden) functionality for note subfields.
MARC21 500-599 and UNIMARC 300-399 subfields are displayed in TEXTAREA rather
than INPUT tags. This is good since usually notes can be pretty long. But if
one of those fields is marked in the framework as 'hidden', then it isn't
displayed at first when you create a record and when you expand the field by
clicking on its label the field is displayed in a one-line INPUT tag.

To reproduce this bug:

- Modify your framework:
  MARC21: 500$a, hidden=1
  UNIMARC: 300$a, hidden=1
- Create a new biblio record with this framework
- Open the tab containing 500 or 300 field
- 500 or 300 tab is collapsed
- Click on 500 or 300 label to expand the field
- 500$a or 300$a is displayed in a one-line INPUT tag, not in a TEXTAREA
  as it should

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test plan works. Also checked cloning and deleting
subfields still works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Simplifies code too. Well documented test plan.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Frédéric Demians 2011-12-14 08:52:32 +01:00 committed by Paul Poulain
parent de7867eead
commit 86406bcf91

View file

@ -467,21 +467,8 @@ sub create_input {
value=\"$value\" \/>
";
}
elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) {
$subfield_data{marc_value} =
"<input type=\"text\"
id=\"".$subfield_data{id}."\"
name=\"".$subfield_data{id}."\"
class=\"input_marceditor\"
tabindex=\"1\"
size=\"67\"
maxlength=\"$max_length\"
value=\"$value\"
\/>";
# it's a standard field
}
else {
# it's a standard field
if (
length($value) > 100
or