Node.js based forum software built for the modern web
feat: allow flagging of user acounts from post tools menu
Julian Lam6931f29d53bd
diff --git a/public/language/en-GB/topic.json b/public/language/en-GB/topic.jsonindex 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 <a href=\"/topic/%1\">%2</a>","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.jsindex 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);