From 48a0687736cd1ff017f8dd04e3f6c11c5479a8df Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:28:59 +0200 Subject: [bugfix/frontend] Add `nosubmit` option to form fields + use it when instance custom CSS disabled (#2290) --- web/source/settings/user/profile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/source/settings/user/profile.js') diff --git a/web/source/settings/user/profile.js b/web/source/settings/user/profile.js index b6daf175b..125f88e70 100644 --- a/web/source/settings/user/profile.js +++ b/web/source/settings/user/profile.js @@ -79,7 +79,7 @@ function UserProfileForm({ data: profile }) { header: useFileInput("header", { withPreview: true }), displayName: useTextInput("display_name", { source: profile }), note: useTextInput("note", { source: profile, valueSelector: (p) => p.source?.note }), - customCSS: useTextInput("custom_css", { source: profile }), + customCSS: useTextInput("custom_css", { source: profile, nosubmit: !instanceConfig.allowCustomCSS }), bot: useBoolInput("bot", { source: profile }), locked: useBoolInput("locked", { source: profile }), discoverable: useBoolInput("discoverable", { source: profile}), @@ -190,7 +190,7 @@ function UserProfileForm({ data: profile }) {