flag post translations

This commit is contained in:
Julian Lam
2014-04-02 08:18:28 -04:00
parent bc29f832fe
commit 339d0e5495
3 changed files with 20 additions and 10 deletions

View File

@@ -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);
});
});
}
});
});
}