diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index 42e9a05e..2057acf4 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -90,10 +90,27 @@ also, all settings from the rails model needed for the editor configuration in t solvedButton.addClass('btn-success'); solvedButton.html('<%= t('request_for_comments.solved') %>'); solvedButton.off('click'); + $('#thank-you-container').show(); } }); }); + $('#send-thank-you-note').on('click', function () { + var value = $('#thank-you-note').val(); + if (value) { + $.ajax({ + dataType: 'json', + method: 'POST', + url: location + '/set_thank_you_note', + data: { + note: value + } + }).done(function() { + $('#thank-you-container').hide(); + }); + } + }); + // set file paths for ace var ACE_FILES_PATH = '/assets/ace/'; _.each(['modePath', 'themePath', 'workerPath'], function(attribute) {