mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-10 04:22:21 +01:00
Changed alert messages for successfull or failed reports
This commit is contained in:
@ -49,13 +49,13 @@ $(function () {
|
||||
var songId = $(this).data('report-song-id');
|
||||
var message = prompt("What is wrong with the song?");
|
||||
if (message == "") {
|
||||
alert("Please enter a message.");
|
||||
createAlert('danger', 'Please enter a message.');
|
||||
return false
|
||||
}
|
||||
$.post('/api/report', {id: songId, msg: message, csrfmiddlewaretoken: csrf_token}, function (result) {
|
||||
console.log(result);
|
||||
if (result.success) {
|
||||
alert("Thanks for the report!");
|
||||
createAlert('success', 'Thanks for your song report!');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user