Send optional thank you note

This commit is contained in:
Maximilian Grundke
2017-06-08 16:46:44 +02:00
parent f0fb52d92a
commit e4d1f57164

View File

@ -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) {