Index: src/forum.c
==================================================================
--- src/forum.c
+++ src/forum.c
@@ -1307,12 +1307,14 @@
}
}else if( g.perm.ModForum ){
/* Allow moderators to approve or reject pending posts. Also allow
** forum supervisors to mark non-special users as trusted and therefore
** able to post unmoderated. */
- @
- @
+ @ \
+ @ \
if( g.perm.AdminForum && !login_is_special(pManifest->zUser) ){
@
Index: src/fossil.page.forumpost.js
==================================================================
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -982,14 +982,26 @@
? "Confirm re-open"
: "Confirm close"),
onconfirm: ()=>form.submit()
});
});
+ form
+ .querySelectorAll("input.action-approve, input.action-reject")
+ .forEach(function(e){
+ e.type = 'button'/*do not submit form on click*/;
+ F.confirmer(e, {
+ confirmText: (e.classList.contains('action-approve')
+ ? "Confirm approval"
+ : "Confirm rejection"),
+ onconfirm: ()=>form.submit()
+ });
+ /* We should also arguably disable the approve/reject
+ button's counterpart while it's counting down. */
+ });
form
.querySelectorAll("input[type='button'].action-status")
.forEach(function(btn){
- btn.classList.remove('hidden');
const sel = btn.previousElementSibling;
const updateButton = ()=>{
/* Enable btn only when the status has been locally
modified. */
if( sel.dataset.initialValue ){
Index: src/style.forum.css
==================================================================
--- src/style.forum.css
+++ src/style.forum.css
@@ -101,5 +101,9 @@
.forumTime {
/* Animate the transition when a ForumPostEditor shifts
its post to the left. */
transition: margin-left 0.25s linear;
}
+
+.forum form input.action-approve {
+ margin-right: 1em;
+}