From 7fb6309a255dd3b65f50d549b0328cd5e14d4273 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 edf1e14..bc81403 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); + }); } };