From 99a4fd24700d8f569fd6db0519a9039cdc87222a 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! Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../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 9f561db913..bfef366e5d 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.39.5