@@ -, +, @@
- Create or reuse an existing subscription
- Make note of the framework the record uses
- Add an item on receive
- Check the maxlength on the various fields is set to 255
(check source code or use developer tools)
- You can also verify that by adding a long note to
one of the note fields
- Apply patch
- Repeat tests, the maxlength should now be 9999
- In your framework settings, change the length of one
of the subfields to another value
- Verify that the item form reflects the change
---
C4/Items.pm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- a/C4/Items.pm
+++ a/C4/Items.pm
@@ -2464,6 +2464,8 @@ sub PrepareItemrecordDisplay {
$defaultvalue =~ s/"/"/g;
}
+ my $maxlength = $tagslib->{$tag}->{$subfield}->{maxlength};
+
# search for itemcallnumber if applicable
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber'
&& C4::Context->preference('itemcallnumber') ) {
@@ -2601,17 +2603,17 @@ sub PrepareItemrecordDisplay {
my $tab= $plugin->noclick? '-1': '';
my $class= $plugin->noclick? ' disabled': '';
my $title= $plugin->noclick? 'No popup': 'Tag editor';
- $subfield_data{marc_value} = qq[...\n].$plugin->javascript;
+ $subfield_data{marc_value} = qq[...\n].$plugin->javascript;
} else {
warn $plugin->errstr;
- $subfield_data{marc_value} = qq(); # supply default input form
+ $subfield_data{marc_value} = qq(); # supply default input form
}
}
elsif ( $tag eq '' ) { # it's an hidden field
- $subfield_data{marc_value} = qq();
+ $subfield_data{marc_value} = qq();
}
elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) { # FIXME: shouldn't input type be "hidden" ?
- $subfield_data{marc_value} = qq();
+ $subfield_data{marc_value} = qq();
}
elsif ( length($defaultvalue) > 100
or (C4::Context->preference("marcflavour") eq "UNIMARC" and
@@ -2620,9 +2622,9 @@ sub PrepareItemrecordDisplay {
500 <= $tag && $tag < 600 )
) {
# oversize field (textarea)
- $subfield_data{marc_value} = qq(\n");
+ $subfield_data{marc_value} = qq(\n");
} else {
- $subfield_data{marc_value} = "";
+ $subfield_data{marc_value} = "";
}
push( @loop_data, \%subfield_data );
}
--