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 eb1bf39718..bde38033df 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; }