mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
fix setting posting for checkbox values
This commit is contained in:
parent
cd9029bb92
commit
4ef2863b79
1 changed files with 3 additions and 1 deletions
|
@ -138,6 +138,8 @@ $('body').on('click', '.save-button', function(e){
|
|||
// grab a JSON representation of the form via form2js
|
||||
var formJSON = form2js('settings-form', ".", false, cleanupFormValues, true);
|
||||
|
||||
console.log(formJSON);
|
||||
|
||||
// re-enable all inputs
|
||||
$("input").each(function(){
|
||||
$(this).prop('disabled', false);
|
||||
|
@ -217,7 +219,7 @@ function showRestartModal() {
|
|||
|
||||
function cleanupFormValues(node) {
|
||||
if (node.type && node.type === 'checkbox') {
|
||||
return { name: node.id, value: node.checked ? true : false };
|
||||
return { name: node.name, value: node.checked ? true : false };
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue