From 8e58c6dd93bfe3f78cb444211059006f7f315a44 Mon Sep 17 00:00:00 2001
From: Isaac Janzen <50783505+janzenisaac@users.noreply.github.com>
Date: Thu, 28 Dec 2023 08:24:24 -0700
Subject: [PATCH] DEV: Add extension points to `Admin User Fields` (#25021)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Add plugin outlet to `AdminUserFieldItem`
- Add ability to include custom fields when saving `AdminUserFieldItem`
- Update plugin API with `includeUserFieldPropertiesOnSave` per ☝️
- Add `DiscoursePluginRegistry` to `UserFieldsController` to add custom columns
---
.../components/admin-user-field-item.hbs | 5 +++++
.../addon/components/admin-user-field-item.js | 6 +++++-
.../discourse/app/lib/plugin-api.js | 20 ++++++++++++++++++-
.../app/services/admin-custom-user-fields.js | 10 ++++++++++
.../admin/user_fields_controller.rb | 3 ++-
docs/CHANGELOG-JAVASCRIPT-PLUGIN-API.md | 7 +++++++
6 files changed, 48 insertions(+), 3 deletions(-)
create mode 100644 app/assets/javascripts/discourse/app/services/admin-custom-user-fields.js
diff --git a/app/assets/javascripts/admin/addon/components/admin-user-field-item.hbs b/app/assets/javascripts/admin/addon/components/admin-user-field-item.hbs
index db31305cf4d..2ac7d15eb0f 100644
--- a/app/assets/javascripts/admin/addon/components/admin-user-field-item.hbs
+++ b/app/assets/javascripts/admin/addon/components/admin-user-field-item.hbs
@@ -55,6 +55,11 @@
{{i18n "admin.user_fields.searchable.title"}}
+
+