mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-10 05:32: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 songId = $(this).data('report-song-id');
|
||||||
var message = prompt("What is wrong with the song?");
|
var message = prompt("What is wrong with the song?");
|
||||||
if (message == "") {
|
if (message == "") {
|
||||||
alert("Please enter a message.");
|
createAlert('danger', 'Please enter a message.');
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
$.post('/api/report', {id: songId, msg: message, csrfmiddlewaretoken: csrf_token}, function (result) {
|
$.post('/api/report', {id: songId, msg: message, csrfmiddlewaretoken: csrf_token}, function (result) {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
alert("Thanks for the report!");
|
createAlert('success', 'Thanks for your song report!');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user