From 973178ea1c6f89416cd33b05be2b27fd9765d402 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 15 Dec 2014 10:29:36 +0100 Subject: [PATCH] [PASSED QA] 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 --- .../modules/tools/marc_modification_templates.tt | 8 ++++---- 1 files 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; } -- 1.7.2.5