mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
flag post translations
This commit is contained in:
@@ -209,15 +209,19 @@ define(['composer', 'share'], function(composer, share) {
|
||||
}
|
||||
|
||||
function flagPost(pid) {
|
||||
bootbox.confirm('Are you sure you want to flag this post?', function(confirm) {
|
||||
if (confirm) {
|
||||
socket.emit('posts.flag', pid, function(err) {
|
||||
if(err) {
|
||||
return app.alertError(err.message);
|
||||
}
|
||||
app.alertSuccess('This post has been flagged for moderation.');
|
||||
});
|
||||
}
|
||||
translator.translate('[[topic:flag_confirm]]', function(message) {
|
||||
bootbox.confirm(message, function(confirm) {
|
||||
if (confirm) {
|
||||
socket.emit('posts.flag', pid, function(err) {
|
||||
if(err) {
|
||||
return app.alertError(err.message);
|
||||
}
|
||||
translator.translate('[[topic:flag_success]]', function(message) {
|
||||
app.alertSuccess(message);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user