From e682a3e5d93298a2e53ffa667238e6532bd4f1c9 Mon Sep 17 00:00:00 2001 From: aignatov-bio <47317017+aignatov-bio@users.noreply.github.com> Date: Wed, 21 Aug 2019 11:05:49 +0200 Subject: [PATCH] Fix steps description and table saving (#1984) --- app/assets/javascripts/protocols/steps.js.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/protocols/steps.js.erb b/app/assets/javascripts/protocols/steps.js.erb index a2b1a47be..9c459357c 100644 --- a/app/assets/javascripts/protocols/steps.js.erb +++ b/app/assets/javascripts/protocols/steps.js.erb @@ -568,7 +568,7 @@ $form.find("[data-role='editable-table']").each(function() { let hot = $(this).find(".hot").handsontable('getInstance'); let contents = $(this).find('.hot-contents'); - let tableData = JSON.stringify({tableData: hot.getData()}); + let tableData = JSON.stringify({data: hot.getData()}); contents.attr("value", tableData); }); @@ -579,7 +579,7 @@ animateSpinner(null, true); DragNDropSteps.appendFilesToForm(ev).then(formData => { - // formData.append('step[description]', TinyMCE.getContent()); + formData.append('step[description]', TinyMCE.getContent()); $.ajax({ url: $form.attr('action'), method: 'POST',