From 037eab52dac9cf7046fdffba8f84e5c534e734bb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 Nov 2013 11:33:05 +0100 Subject: [PATCH] [PASSED QA] Bug 8683: Clear button doesn't clear all item fields The clear js function parses input text, but input filled to a plugin does not contain the type attribute. Test plan: - fill the barcode field to the barcode plugin - go on the new order page - verify the barcode plugin works as before - verify the clear link clears the barcode field and all others fields. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Works as expected, passes all tests and QA script. Template change only. Barcode and date acquired are now also cleared with the 'clear' link. But: it only works when you enter a barcode manually currently, because the AutoBarcode functionality is broken on master (bug 11273). --- C4/Items.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 073d6f7..231e5c4 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2797,14 +2797,14 @@ sub PrepareItemrecordDisplay { my $extended_param = plugin_parameters( $dbh, undef, $tagslib, $subfield_data{id}, undef ); my ( $function_name, $javascript ) = plugin_javascript( $dbh, undef, $tagslib, $subfield_data{id}, undef ); $subfield_data{random} = int(rand(1000000)); # why do we need 2 different randoms? - $subfield_data{marc_value} = qq[ ... $javascript]; } else { warn "Plugin Failed: $plugin"; - $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 -- 1.8.3.2