From 6687ed96f72c8b6238b8e7b5bd5088e7fc0a3992 Mon Sep 17 00:00:00 2001 From: Jay Collett <486430+jaycollett@users.noreply.github.com> Date: Thu, 29 Jan 2026 13:49:24 -0500 Subject: [PATCH] Fix checkbox config values always returning "1" The .val() method on checkbox elements returns the value attribute (typically "1") regardless of the checked state. This caused boolean config options like ignore_tls to always be saved as "1" even when the checkbox was unchecked. Fixed by checking if the element is a checkbox and using the :checked state to determine the value. Fixes linuxserver/Heimdall-Apps#782 --- resources/assets/js/app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 42f31c81b..513db85a5 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -310,7 +310,12 @@ $.when($.ready).then(() => { data.url = apiurl; $(".config-item").each(function () { const config = $(this).data("config"); - data[config] = $(this).val(); + // For checkboxes, use checked state instead of value attribute + if ($(this).is(":checkbox")) { + data[config] = $(this).is(":checked") ? "1" : "0"; + } else { + data[config] = $(this).val(); + } }); data.id = $("form[data-item-id]").data("item-id");