From 67f4555584ab40de148789330179e207cff165fb Mon Sep 17 00:00:00 2001 From: Zanz2 Date: Fri, 31 Aug 2018 11:04:20 +0200 Subject: [PATCH] Fixed the issue, tested all 3 scenarios --- app/assets/javascripts/protocols/steps.js.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/protocols/steps.js.erb b/app/assets/javascripts/protocols/steps.js.erb index 26f282996..341a2c68c 100644 --- a/app/assets/javascripts/protocols/steps.js.erb +++ b/app/assets/javascripts/protocols/steps.js.erb @@ -545,11 +545,15 @@ var $tinyMCEInput = TinyMCE.getContent(); var descriptionValid = textValidator(ev, $descrTextarea, 0, <%= Constants::TEXT_MAX_LENGTH %>, false, $tinyMCEInput); + var $table_names = $form.find(".table_name"); + var table_nameValid = textValidator(ev, $table_names, 1, + <%= Constants::NAME_MAX_LENGTH %>); if (DragNDropSteps.filesStatus() && checklistsValid && nameValid && - descriptionValid) { + descriptionValid && + table_nameValid ) { $form.find("[data-role='editable-table']").each(function() { var hot = $(this).find(".hot").handsontable('getInstance');