Node.js based forum software built for the modern web
feat: move new user restrrictions
Barış Soner Uşaklı3d505c5c9d68
diff --git a/public/language/en-GB/admin/settings/chat.json b/public/language/en-GB/admin/settings/chat.jsonindex 86360a34ee..a5412d1095 100644--- a/public/language/en-GB/admin/settings/chat.json+++ b/public/language/en-GB/admin/settings/chat.json@@ -8,7 +8,6 @@"max-chat-room-name-length": "Maximum length of chat room names","max-room-size": "Maximum number of users in chat rooms","delay": "Time between chat messages (ms)",- "newbieDelay": "... for new users (ms)","notification-delay": "Notification delay for chat messages","notification-delay-help": "Additional messages sent between this time are collated, and the user is notified once per delay period. Set this to 0 to disable the delay.","restrictions.seconds-edit-after": "Number of seconds a chat message will remain editable.",diff --git a/public/language/en-GB/admin/settings/post.json b/public/language/en-GB/admin/settings/post.jsonindex 9de7dc76fa..c93c901455 100644--- a/public/language/en-GB/admin/settings/post.json+++ b/public/language/en-GB/admin/settings/post.json@@ -10,7 +10,6 @@"length": "Post Length","post-queue": "Post Queue","restrictions": "Posting Restrictions",- "restrictions-new": "New User Restrictions","restrictions.post-queue": "Enable post queue","restrictions.post-queue-rep-threshold": "Reputation required to bypass post queue","restrictions.groups-exempt-from-post-queue": "Select groups that should be exempt from the post queue",@@ -18,9 +17,6 @@"restrictions.post-queue-help": "Enabling post queue will put the posts of new users in a queue for approval","restrictions-new.post-queue-help": "Enabling new user restrictions will set restrictions on posts created by new users","restrictions.seconds-between": "Number of seconds between posts",- "restrictions.seconds-between-new": "Seconds between posts for new users",- "restrictions.rep-threshold": "Reputation threshold before these restrictions are lifted",- "restrictions.seconds-before-new": "Seconds before a new user can make their first post","restrictions.seconds-edit-after": "Number of seconds a post remains editable (set to 0 to disable)","restrictions.seconds-delete-after": "Number of seconds a post remains deletable (set to 0 to disable)","restrictions.replies-no-delete": "Number of replies after users are disallowed to delete their own topics (set to 0 to disable)",diff --git a/public/language/en-GB/admin/settings/user.json b/public/language/en-GB/admin/settings/user.jsonindex 88f14c76cd..7c55d69ee5 100644--- a/public/language/en-GB/admin/settings/user.json+++ b/public/language/en-GB/admin/settings/user.json@@ -81,5 +81,11 @@"categoryWatchState": "Default category watch state","categoryWatchState.tracking": "Tracking","categoryWatchState.notwatching": "Not Watching",- "categoryWatchState.ignoring": "Ignoring"+ "categoryWatchState.ignoring": "Ignoring",+ "restrictions-new": "New User Restrictions",+ "restrictions.rep-threshold": "Reputation threshold before these restrictions are lifted",+ "restrictions.seconds-between-new": "Seconds between posts for new users",+ "restrictions.seconds-before-new": "Seconds before a new user can make their first post",+ "restrictions.seconds-edit-after-new": "Number of seconds a post remains editable for new users (set to 0 to disable)",+ "restrictions.milliseconds-between-messages": "Time between chat messages for new users (ms)"}diff --git a/src/views/admin/settings/chat.tpl b/src/views/admin/settings/chat.tplindex cbd138d0c8..bc37c83757 100644--- a/src/views/admin/settings/chat.tpl+++ b/src/views/admin/settings/chat.tpl@@ -49,16 +49,10 @@<input id="maximumUsersInChatRoom" type="text" class="form-control" value="0" data-field="maximumUsersInChatRoom"></div>- <fieldset class="row">- <div class="mb-3 col-sm-6">- <label class="form-label" for="chatMessageDelay">[[admin/settings/chat:delay]]</label>- <input id="chatMessageDelay" type="text" class="form-control" data-field="chatMessageDelay">- </div>- <div class="mb-3 col-sm-6">- <label class="form-label" for="newbieChatMessageDelay">[[admin/settings/chat:newbieDelay]]</label>- <input id="newbieChatMessageDelay" type="text" class="form-control" data-field="newbieChatMessageDelay">- </div>- </fieldset>+ <div class="mb-3">+ <label class="form-label" for="chatMessageDelay">[[admin/settings/chat:delay]]</label>+ <input id="chatMessageDelay" type="text" class="form-control" data-field="chatMessageDelay">+ </div><div class="mb-3"><label class="form-label" for="notificationSendDelay">[[admin/settings/chat:notification-delay]]</label>diff --git a/src/views/admin/settings/post.tpl b/src/views/admin/settings/post.tplindex 816dfabede..bd99f75a4a 100644--- a/src/views/admin/settings/post.tpl+++ b/src/views/admin/settings/post.tpl@@ -120,33 +120,6 @@<hr/>- <!-- new user restrictions -->- <div id="new-user-restrictions" class="mb-4">- <h5 class="fw-bold tracking-tight settings-header">[[admin/settings/post:restrictions-new]]</h5>-- <div class="mb-3">- <label class="form-label" for="newbiePostDelayThreshold">[[admin/settings/post:restrictions.rep-threshold]]</label>- <input id="newbiePostDelayThreshold" type="text" class="form-control" value="3" data-field="newbiePostDelayThreshold">- </div>-- <div class="mb-3">- <label class="form-label" for="newbiePostDelay">[[admin/settings/post:restrictions.seconds-between-new]]</label>- <input id="newbiePostDelay" type="text" class="form-control" value="120" data-field="newbiePostDelay">- </div>-- <div class="mb-3">- <label class="form-label" for="initialPostDelay">[[admin/settings/post:restrictions.seconds-before-new]]</label>- <input id="initialPostDelay" type="text" class="form-control" value="10" data-field="initialPostDelay">- </div>-- <div class="mb-3">- <label class="form-label" for="newbiePostEditDuration">[[admin/settings/post:restrictions.seconds-edit-after]]</label>- <input id="newbiePostEditDuration" type="text" class="form-control" value="120" data-field="newbiePostEditDuration">- </div>- </div>-- <hr/>-<!-- post queue settings --><div id="post-queue" class="mb-4"><h5 class="fw-bold tracking-tight settings-header">[[admin/settings/post:post-queue]]</h5>diff --git a/src/views/admin/settings/user.tpl b/src/views/admin/settings/user.tplindex 60d80f781e..4a2bcc19b7 100644--- a/src/views/admin/settings/user.tpl+++ b/src/views/admin/settings/user.tpl@@ -213,6 +213,38 @@<hr/>+ <!-- new user restrictions -->+ <div id="new-user-restrictions" class="mb-4">+ <h5 class="fw-bold tracking-tight settings-header">[[admin/settings/user:restrictions-new]]</h5>++ <div class="mb-3">+ <label class="form-label" for="newbiePostDelayThreshold">[[admin/settings/user:restrictions.rep-threshold]]</label>+ <input id="newbiePostDelayThreshold" type="text" class="form-control" value="3" data-field="newbiePostDelayThreshold">+ </div>++ <div class="mb-3">+ <label class="form-label" for="newbiePostDelay">[[admin/settings/user:restrictions.seconds-between-new]]</label>+ <input id="newbiePostDelay" type="text" class="form-control" value="120" data-field="newbiePostDelay">+ </div>++ <div class="mb-3">+ <label class="form-label" for="initialPostDelay">[[admin/settings/user:restrictions.seconds-before-new]]</label>+ <input id="initialPostDelay" type="text" class="form-control" value="10" data-field="initialPostDelay">+ </div>++ <div class="mb-3">+ <label class="form-label" for="newbiePostEditDuration">[[admin/settings/user:restrictions.seconds-edit-after-new]]</label>+ <input id="newbiePostEditDuration" type="text" class="form-control" value="120" data-field="newbiePostEditDuration">+ </div>++ <div class="mb-3">+ <label class="form-label" for="newbieChatMessageDelay">[[admin/settings/user:restrictions.milliseconds-between-messages]]</label>+ <input id="newbieChatMessageDelay" type="text" class="form-control" data-field="newbieChatMessageDelay">+ </div>+ </div>++ <hr/>+<div id="guest-settings" class="mb-4"><h5 class="fw-bold tracking-tight settings-header">[[admin/settings/guest:guest-settings]]</h5>