From 4ffac5ba4a98a88c00f2ee6f3b701003630b8175 Mon Sep 17 00:00:00 2001 From: John Beppu Date: Wed, 5 Nov 2008 10:51:32 -0600 Subject: [PATCH] bug 2563: could not input into marc 008, fields 7-10 and 11-14 You actually *could* input data into those fields, but it wasn't immediately obvious, because the field size was "4" and the value was " ". You couldn't type anything in until you backspaced over the spaces that were there by default. UPDATE 2008-11-05: Make absolutely sure that those values are 4 chars long (via JavaScript) Signed-off-by: Galen Charlton --- cataloguing/value_builder/marc21_field_008.pl | 4 ++++ .../value_builder/marc21_field_008.tmpl | 24 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/cataloguing/value_builder/marc21_field_008.pl b/cataloguing/value_builder/marc21_field_008.pl index 02af66c4cd..793f0137d1 100755 --- a/cataloguing/value_builder/marc21_field_008.pl +++ b/cataloguing/value_builder/marc21_field_008.pl @@ -111,6 +111,10 @@ sub plugin { my $f38 = substr($result,38,1); my $f39 = substr($result,39,1); + # bug 2563 + $f710 = "" if ($f710 =~ /^\s*$/); + $f1114 = "" if ($f1114 =~ /^\s*$/); + if ((!$f1) ||($f1 =~ m/ /)){ $f1=$dateentered; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tmpl index 302fd60ea2..276fd8f758 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tmpl @@ -607,15 +607,33 @@