diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index 2057acf4..9803b581 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -30,9 +30,12 @@ <%= t('request_for_comments.write_a_thank_you_node') %>

- + <% elsif (@request_for_comment.solved?) %> @@ -77,7 +80,9 @@ also, all settings from the rails model needed for the editor configuration in t var solvedButton = $('#mark-as-solved-button'); var commentOnExerciseButton = $('#comment-exercise-button'); - var addCommentExerciseButton = $('#addCommentExerciseButton') + var addCommentExerciseButton = $('#addCommentExerciseButton'); + + var thankYouContainer = $('#thank-you-container'); solvedButton.on('click', function(){ $.ajax({ @@ -90,7 +95,7 @@ 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(); + thankYouContainer.show(); } }); }); @@ -106,11 +111,15 @@ also, all settings from the rails model needed for the editor configuration in t note: value } }).done(function() { - $('#thank-you-container').hide(); + thankYouContainer.hide(); }); } }); + $('#cancel-thank-you-note').on('click', function () { + thankYouContainer.hide(); + }); + // set file paths for ace var ACE_FILES_PATH = '/assets/ace/'; _.each(['modePath', 'themePath', 'workerPath'], function(attribute) { diff --git a/config/locales/de.yml b/config/locales/de.yml index 46b52fa5..d566d947 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -465,6 +465,7 @@ de: comment_exercise: "Ich möchte die Aufgabenstellung kommentieren" write_a_thank_you_node: "Wenn Sie möchten, können Sie sich bei allen Kommentierenden bedanken:" send_thank_you_note: "Senden" + cancel_thank_you_note: "Nichts senden" sessions: create: failure: Fehlerhafte E-Mail oder Passwort. diff --git a/config/locales/en.yml b/config/locales/en.yml index 8d5c7538..1b8539c4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -486,6 +486,7 @@ en: comment_exercise: "I would like to give feedback for this exercise" write_a_thank_you_node: "If you want, you can write a thank you note to all commentors:" send_thank_you_note: "Send" + cancel_thank_you_note: "Don't send" sessions: create: failure: Invalid email or password.