From f3b28a5d8ad381bbe5b3edce994e0d45ee96f920 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 Nov 2013 11:33:05 +0100 Subject: [PATCH] Bug 8683: ensure clear button clears all item fields on order form 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). Signed-off-by: Galen Charlton --- C4/Items.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 073d6f7541..231e5c43e8 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 -- 2.39.5