Skip to content

Fix checkbox config values always returning "1" in Test config#1577

Merged
KodeStar merged 1 commit into
2.xfrom
fix/checkbox-test-config
Jul 9, 2026
Merged

Fix checkbox config values always returning "1" in Test config#1577
KodeStar merged 1 commit into
2.xfrom
fix/checkbox-test-config

Conversation

@KodeStar

@KodeStar KodeStar commented Jul 9, 2026

Copy link
Copy Markdown
Member

Revives #1536 (closed as stale, original work by @jaycollett — his commit authorship is preserved). Fixes linuxserver/Heimdall-Apps#782.

The Test-button config gatherer wrote $(this).val() for every .config-item; jQuery .val() on a checkbox returns its value attribute regardless of checked state, and app config blades pair a hidden input (0) with a checkbox (1) sharing the same data-config, so options like ignore_tls always tested as "1". Checkboxes now report their checked state ("1"/"0"). Normal form saves were never affected — only the Test path.

Beyond the original PR: Heimdall serves the committed compiled bundle public/js/app.js, which #1536 didn't touch, so it would have had no runtime effect until a rebuild. This PR mirrors the fix there; the edit is byte-identical to what npm run development emits for that block (a full rebuild was avoided because dependency drift churns ~1200 unrelated lines).

Verified with jsdom + the repo's bundled jQuery against a real hidden+checkbox blade pairing: old code returns "1" checked and unchecked; fixed code returns "1"/"0". ESLint passes.

Checkbox-type config options (e.g. ignore_tls) always tested as "1"
regardless of the checkbox state. The Test-button config gatherer used
$(this).val() for every .config-item, and jQuery .val() on a checkbox
returns its value attribute ("1") regardless of checked state. App
config blades pair a hidden input (0) with a checkbox (1) sharing the
same data-config, and the checkbox is last in DOM order, so it always
overwrote the value with "1". Normal form saves were unaffected.

Use the :checked state for checkboxes so unchecking now tests as "0".

Also rebuilds the committed compiled bundle (public/js/app.js) so the
fix takes effect at runtime; the edit is byte-identical to the Laravel
Mix development build output for this block.

Fixes linuxserver/Heimdall-Apps#782
@KodeStar KodeStar merged commit 55bda9d into 2.x Jul 9, 2026
2 checks passed
@KodeStar KodeStar deleted the fix/checkbox-test-config branch July 9, 2026 21:06
@LinuxServer-CI LinuxServer-CI moved this from PRs to Done in Issue & PR Tracker Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Skip TLS always returns 1

3 participants