diff options
Diffstat (limited to 'settings/js/admin.js')
-rw-r--r-- | settings/js/admin.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js index 8b1494881a5..23f445b708f 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -19,12 +19,15 @@ $(document).ready(function(){ }); $('#shareAPI input').change(function() { - if ($(this).attr('type') == 'radio') { - console.log('radio'); - } if ($(this).attr('type') == 'checkbox') { - console.log('checked'); + if (this.checked) { + var value = 'yes'; + } else { + var value = 'no'; + } + } else { + var value = $(this).val() } - OC.AppConfig.setValue('core', 'shareapi_', $(this).val()); + OC.AppConfig.setValue('core', $(this).attr('name'), value); }); });
\ No newline at end of file |