From 6931f29d53bd6a0d0c5352a1d45792cf5de306c0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 29 Jun 2020 19:49:48 -0400 Subject: [PATCH] feat: allow flagging of user acounts from post tools menu --- public/language/en-GB/topic.json | 3 ++- public/src/client/topic/postTools.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/public/language/en-GB/topic.json b/public/language/en-GB/topic.json index f61d3d8a87..8498b83b1e 100644 --- a/public/language/en-GB/topic.json +++ b/public/language/en-GB/topic.json @@ -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 %2", "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index 6dea439ce7..40357eca87 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -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);