summaryrefslogtreecommitdiff
path: root/web/source/settings/lib/form/get-form-mutations.ts
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-10-24 10:28:59 +0200
committerLibravatar GitHub <noreply@github.com>2023-10-24 10:28:59 +0200
commit48a0687736cd1ff017f8dd04e3f6c11c5479a8df (patch)
tree5875b1956b0edcdba031e4caace9b4455fcd0fb7 /web/source/settings/lib/form/get-form-mutations.ts
parent[chore] update minify library (#2286) (diff)
downloadgotosocial-48a0687736cd1ff017f8dd04e3f6c11c5479a8df.tar.xz
[bugfix/frontend] Add `nosubmit` option to form fields + use it when instance custom CSS disabled (#2290)
Diffstat (limited to 'web/source/settings/lib/form/get-form-mutations.ts')
-rw-r--r--web/source/settings/lib/form/get-form-mutations.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/source/settings/lib/form/get-form-mutations.ts b/web/source/settings/lib/form/get-form-mutations.ts
index 6e1bfa02d..a3dc36601 100644
--- a/web/source/settings/lib/form/get-form-mutations.ts
+++ b/web/source/settings/lib/form/get-form-mutations.ts
@@ -27,6 +27,12 @@ export default function getFormMutations(
const mutationData: Array<[string, any]> = [];
Object.values(form).forEach((field) => {
+ if (field.nosubmit) {
+ // Completely ignore
+ // this field.
+ return;
+ }
+
if ("selectedValues" in field) {
// FieldArrayInputHook.
const selected = field.selectedValues();