+
+
+
+
+
+
+
+
+ {{htmlSafe @setting.description}}
+
+}
diff --git a/app/assets/javascripts/admin/addon/mixins/setting-component.js b/app/assets/javascripts/admin/addon/mixins/setting-component.js
index bb7b8e66317..e0a67e6fc58 100644
--- a/app/assets/javascripts/admin/addon/mixins/setting-component.js
+++ b/app/assets/javascripts/admin/addon/mixins/setting-component.js
@@ -34,6 +34,7 @@ const CUSTOM_TYPES = [
"emoji_list",
"named_list",
"file_size_restriction",
+ "file_types_list",
];
const AUTO_REFRESH_ON_SAVE = ["logo", "logo_small", "large_icon"];
@@ -230,6 +231,11 @@ export default Mixin.create({
}
},
+ @action
+ changeValueCallback(value) {
+ this.set("buffered.value", value);
+ },
+
@action
cancel() {
this.rollbackBuffer();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/site-setting-test.js b/app/assets/javascripts/discourse/tests/integration/components/site-setting-test.js
index c7f3a090db3..c3f0cb99cf5 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/site-setting-test.js
+++ b/app/assets/javascripts/discourse/tests/integration/components/site-setting-test.js
@@ -59,4 +59,33 @@ module("Integration | Component | site-setting", function (hooks) {
assert.strictEqual(query(".validation-error h1"), null);
});
+
+ test("displays file types list setting", async function (assert) {
+ this.set("setting", {
+ setting: "theme_authorized_extensions",
+ value: "jpg|jpeg|png",
+ type: "file_types_list",
+ });
+
+ await render(hbs`