From fb0f9745801d3704c0a55eecf9dd44a295ade68b Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 13 Feb 2023 20:22:01 +0100 Subject: [PATCH] Fix #1494 Handle `checkbox`different than other `input` elements (such as text, password ...), by using a different selector and check, if the `checkbox` is checked. --- bl-kernel/admin/views/plugins-settings.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bl-kernel/admin/views/plugins-settings.php b/bl-kernel/admin/views/plugins-settings.php index d5d3f1b7..b0047000 100644 --- a/bl-kernel/admin/views/plugins-settings.php +++ b/bl-kernel/admin/views/plugins-settings.php @@ -14,12 +14,21 @@ className: className }; - $('input').each(function() { + $('input:not([type=checkbox])').each(function() { var key = $(this).attr('name'); var value = $(this).val(); args[key] = value; }); + $('input[type=checkbox]').each(function() { + var key = $(this).attr('name'); + var value = $(this).val(); + + if($(this).is(":checked")) { + args[key] = value; + } + }); + $('select').each(function() { var key = $(this).attr('name'); var value = $(this).val();