mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 10:58:22 +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
|
// grab a JSON representation of the form via form2js
|
||||||
var formJSON = form2js('settings-form', ".", false, cleanupFormValues, true);
|
var formJSON = form2js('settings-form', ".", false, cleanupFormValues, true);
|
||||||
|
|
||||||
|
console.log(formJSON);
|
||||||
|
|
||||||
// re-enable all inputs
|
// re-enable all inputs
|
||||||
$("input").each(function(){
|
$("input").each(function(){
|
||||||
$(this).prop('disabled', false);
|
$(this).prop('disabled', false);
|
||||||
|
@ -217,7 +219,7 @@ function showRestartModal() {
|
||||||
|
|
||||||
function cleanupFormValues(node) {
|
function cleanupFormValues(node) {
|
||||||
if (node.type && node.type === 'checkbox') {
|
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 {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue