diff --git a/front/settings.php b/front/settings.php index a307d0ab..c69f3a5b 100755 --- a/front/settings.php +++ b/front/settings.php @@ -713,11 +713,16 @@ function saveSettings() { settingsArray.push([prefix, setCodeName, dataType, value]); - } else if (dataType === 'boolean') { + } else if (inputType === 'checkbox') { - value = $(`#${setCodeName}`).is(':checked') ? 1 : 0; - value = applyTransformers(value, transformers); + value = $(`#${setCodeName}`).is(':checked') ? 1 : 0; + if(dataType === "boolean") + { + value = value == 1 ? "True" : "False"; + } + + value = applyTransformers(value, transformers); settingsArray.push([prefix, setCodeName, dataType, value]); } else if (dataType === "array" ) { @@ -757,6 +762,7 @@ function saveSettings() { value = $('#' + setCodeName).val(); value = applyTransformers(value, transformers); + console.error(`[saveSettings] Saving value "${value}"`); settingsArray.push([prefix, setCodeName, dataType, value]); } });