feat: allow flagging of user acounts from post tools menu

This commit is contained in:
Julian Lam
2020-06-29 19:49:48 -04:00
parent e7ec5550f3
commit 6931f29d53
2 changed files with 12 additions and 1 deletions

View File

@@ -41,7 +41,8 @@
"bookmark_instructions" : "Click here to return to the last read post in this thread.",
"flag_title": "Flag this post for moderation",
"flag_post": "Flag this post",
"flag_user": "Flag this user",
"merged_message": "This topic has been merged into <a href=\"/topic/%1\">%2</a>",
"deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.",

View File

@@ -129,6 +129,16 @@ define('forum/topic/postTools', [
});
});
postContainer.on('click', '[component="post/flagUser"]', function () {
var uid = getData($(this), 'data-uid');
require(['flags'], function (flags) {
flags.showFlagModal({
type: 'user',
id: uid,
});
});
});
postContainer.on('click', '[component="post/edit"]', function () {
var btn = $(this);