fix setting posting for checkbox values

This commit is contained in:
Stephen Birarda 2014-09-30 15:01:37 -07:00
parent cd9029bb92
commit 4ef2863b79

View file

@ -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;
}