diff --git a/app/assets/javascripts/admin/addon/controllers/admin-config-legal-settings.js b/app/assets/javascripts/admin/addon/controllers/admin-config-legal-settings.js
new file mode 100644
index 00000000000..11b8022ee11
--- /dev/null
+++ b/app/assets/javascripts/admin/addon/controllers/admin-config-legal-settings.js
@@ -0,0 +1,3 @@
+import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
+
+export default class AdminConfigLegalSettingsController extends AdminAreaSettingsBaseController {}
diff --git a/app/assets/javascripts/admin/addon/routes/admin-config-legal.js b/app/assets/javascripts/admin/addon/routes/admin-config-legal.js
new file mode 100644
index 00000000000..a6c1adb68d0
--- /dev/null
+++ b/app/assets/javascripts/admin/addon/routes/admin-config-legal.js
@@ -0,0 +1,8 @@
+import DiscourseRoute from "discourse/routes/discourse";
+import { i18n } from "discourse-i18n";
+
+export default class AdminConfigLegalRoute extends DiscourseRoute {
+ titleToken() {
+ return i18n("admin.community.sidebar_link.legal");
+ }
+}
diff --git a/app/assets/javascripts/admin/addon/routes/admin-route-map.js b/app/assets/javascripts/admin/addon/routes/admin-route-map.js
index 92e709df86b..6a2ec2e3cbe 100644
--- a/app/assets/javascripts/admin/addon/routes/admin-route-map.js
+++ b/app/assets/javascripts/admin/addon/routes/admin-route-map.js
@@ -231,6 +231,11 @@ export default function () {
path: "/",
});
});
+ this.route("legal", function () {
+ this.route("settings", {
+ path: "/",
+ });
+ });
this.route("trustLevels", { path: "/trust-levels" }, function () {
this.route("settings", {
path: "/",
diff --git a/app/assets/javascripts/admin/addon/templates/config-legal-settings.hbs b/app/assets/javascripts/admin/addon/templates/config-legal-settings.hbs
new file mode 100644
index 00000000000..29611a8462f
--- /dev/null
+++ b/app/assets/javascripts/admin/addon/templates/config-legal-settings.hbs
@@ -0,0 +1,21 @@
+
+ <:breadcrumbs>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js b/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js
index 32d896286a0..af1142234d9 100644
--- a/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js
+++ b/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js
@@ -79,9 +79,7 @@ export const ADMIN_NAV_MAP = [
},
{
name: "admin_legal",
- route: "adminSiteSettingsCategory",
- routeModels: ["legal"],
- query: { filter: "" },
+ route: "adminConfig.legal.settings",
label: "admin.community.sidebar_link.legal",
icon: "gavel",
},
diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb
index 1a40faeefef..5699729e27d 100644
--- a/app/models/site_setting.rb
+++ b/app/models/site_setting.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class SiteSetting < ActiveRecord::Base
- VALID_AREAS = %w[about embedding emojis flags fonts notifications permalinks]
+ VALID_AREAS = %w[about embedding emojis flags fonts legal notifications permalinks]
extend GlobalPath
extend SiteSettingExtension
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index a1690c8f40b..7447108a9a7 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -5146,6 +5146,9 @@ en:
notifications:
title: "Notifications"
header_description: "Configure how notifications are managed and delivered for users, including email preferences, push notifications, mention limits, and notification consolidation."
+ legal:
+ title: "Legal"
+ header_description: "Configure legal settings, such as terms of service, privacy policy, contact details, and EU-specific considerations."
trust_levels:
title: "Trust levels"
header_description: "Trust level settings allow you to fine-tune the requirements and notifications for your community’s progression system, which automatically promotes users to higher trust levels as they demonstrate consistent, positive engagement with your forum."
diff --git a/config/routes.rb b/config/routes.rb
index 13e1be5190d..5ad38969f23 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -397,6 +397,7 @@ Discourse::Application.routes.draw do
get "login-and-authentication" => "site_settings#index"
get "logo" => "site_settings#index"
get "notifications" => "site_settings#index"
+ get "legal" => "site_settings#index"
get "trust-levels" => "site_settings#index"
resources :flags, only: %i[index new create update destroy] do
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 4c3170d1815..b5b27783dd3 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -53,10 +53,10 @@ required:
contact_email:
default: ""
type: email
- area: "about|notifications"
+ area: "about|notifications|legal"
contact_url:
default: ""
- area: "about"
+ area: "about|legal"
notification_email:
default: "noreply@unconfigured.discourse.org"
type: email
@@ -75,13 +75,13 @@ required:
list_type: simple
company_name:
default: ""
- area: "about"
+ area: "about|legal"
governing_law:
default: ""
- area: "about"
+ area: "about|legal"
city_for_disputes:
default: ""
- area: "about"
+ area: "about|legal"
branding:
logo:
@@ -2564,17 +2564,22 @@ legal:
tos_url:
client: true
default: ""
+ area: "legal"
privacy_policy_url:
client: true
default: ""
+ area: "legal"
faq_url:
client: true
default: ""
+ area: "legal"
log_anonymizer_details:
default: true
+ area: "legal"
display_eu_visitor_stats:
default: false
client: true
+ area: "legal"
backups:
enable_backups: