From e1091943408f97a2f9ae9cda17bf016dfa997bf2 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Tue, 16 Jun 2026 17:25:09 +0200 Subject: [PATCH] fix: sync all sfw hidden inputs on checkbox toggle --- static/dropdown.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/static/dropdown.ts b/static/dropdown.ts index edf1e14f..bc81403e 100644 --- a/static/dropdown.ts +++ b/static/dropdown.ts @@ -144,10 +144,11 @@ const initCheckboxVisuals = (): void => { box.classList.toggle("bg-foreground-muted/12", input.checked); box.classList.toggle("border-white/45", !input.checked); box.classList.toggle("bg-transparent", !input.checked); - const value = input.form?.querySelector("[data-sfw-value]"); - if (value) { - value.value = String(input.checked); - } + document + .querySelectorAll('input[type="hidden"][name="sfw"]') + .forEach((value) => { + value.value = String(input.checked); + }); } };