diff --git a/public/js/app.js b/public/js/app.js index e01bd0c8d..4d41224d4 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -4271,7 +4271,12 @@ $.when($.ready).then(function () { data.url = apiurl; $(".config-item").each(function () { var 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"); if (data.password && data.password === fakePassword) { diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index abe633d91..3a5286cde 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");