diff --git a/public/language/en-GB/post-queue.json b/public/language/en-GB/post-queue.json index 9ab4fc3ba7..85bda81ac3 100644 --- a/public/language/en-GB/post-queue.json +++ b/public/language/en-GB/post-queue.json @@ -17,5 +17,6 @@ "reject": "Reject", "remove": "Remove", "notify": "Notify", - "notify-user": "Notify User" + "notify-user": "Notify User", + "confirm-reject": "Do you want to reject this post?" } \ No newline at end of file diff --git a/public/src/client/post-queue.js b/public/src/client/post-queue.js index 0be5043450..f5c471ca30 100644 --- a/public/src/client/post-queue.js +++ b/public/src/client/post-queue.js @@ -33,12 +33,17 @@ define('forum/post-queue', [ }); }); } + function confirmReject() { + return new Promise((resolve) => { + bootbox.confirm('[[post-queue:confirm-reject]]', resolve); + }); + } const parent = $(this).parents('[data-id]'); const action = $(this).attr('data-action'); const id = parent.attr('data-id'); const listContainer = parent.get(0).parentNode; - if (!['accept', 'reject', 'notify'].includes(action)) { + if ((!['accept', 'reject', 'notify'].includes(action)) || (action === 'reject' && !await confirmReject())) { return; }