From ffb10b5c98b51e6620965cf1ece8e562e782dbd3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Sat, 16 Feb 2019 11:46:08 -0300 Subject: [PATCH] Bug 22245: Allow copy/move from and to control fields The JS conditions were wrong, we want to allow copy and move between control fields. Test plan: Create a new MARC modification template action using control fields. Confirm that you are allowed to copy/move a control field to another one Signed-off-by: Hayley Mapley --- koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js index eb1bf397184..bde38033df6 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js +++ b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js @@ -25,8 +25,8 @@ $(document).ready(function() { alert( MSG_MMT_CONTROL_FIELD_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_field").val() >= 10 ) || + ( $("#to_field").val() < 10 && $("#from_field").val() >= 10 ) ) { alert( MSG_MMT_CONTROL_FIELD ); return false; } -- 2.11.0