From 15a0994e0ad3c00da59d75533b7b1ac9e77d197b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 15 Dec 2014 10:29:36 +0100 Subject: [PATCH] Bug 11395: A control field is a field with tag < 10 This patch fixes the existing test about control fields. A control field is < 10, not <=10! --- .../prog/en/modules/tools/marc_modification_templates.tt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt index 9f561db..bfef366 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt @@ -23,13 +23,13 @@ $(document).ready(function() { alert(_("The destination should be filled.")); return false; } - if ( ( $("#to_field").val() <= 10 && $("#to_subfield").val().length > 0 ) || - ( $("#from_field").val() <= 10 && $("#from_subfield").val().length > 0 ) ) { + if ( ( $("#to_field").val() < 10 && $("#to_subfield").val().length > 0 ) || + ( $("#from_field").val() < 10 && $("#from_subfield").val().length > 0 ) ) { alert(_("If the field is a control field, the subfield should be empty")); return false; } - if ( ( $("#from_field").val() <= 10 && $("#to_subfield").val().length == 0 ) || - ( $("#to_field").val() <= 10 && $("#from_subfield").val().length == 0 ) ) { + if ( ( $("#from_field").val() < 10 && $("#to_subfield").val().length == 0 ) || + ( $("#to_field").val() < 10 && $("#from_subfield").val().length == 0 ) ) { alert(_("A control field cannot be used with a regular field.")); return false; } -- 2.1.0