fix: sync all sfw hidden inputs on checkbox toggle

This commit is contained in:
2026-06-16 17:25:09 +02:00
parent d2d14a27c2
commit e109194340

View File

@@ -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<HTMLInputElement>("[data-sfw-value]");
if (value) {
document
.querySelectorAll<HTMLInputElement>('input[type="hidden"][name="sfw"]')
.forEach((value) => {
value.value = String(input.checked);
}
});
}
};