summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-27 20:45:36 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-27 20:45:36 -0400
commit42a291286b4627191a18e8848dffee0bf5574c93 (patch)
treeb0ecaa5e50ed0e5f5142dad06a7649071d5e9905 /settings
parent9cd55508c3181ff59080f84a341bd5ecf3e88eab (diff)
downloadnextcloud-server-42a291286b4627191a18e8848dffee0bf5574c93.tar.gz
nextcloud-server-42a291286b4627191a18e8848dffee0bf5574c93.zip
Fix incorrect Javascript for changing Share API settings
Diffstat (limited to 'settings')
-rw-r--r--settings/js/admin.js13
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