]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix incorrect Javascript for changing Share API settings
authorMichael Gapczynski <mtgap@owncloud.com>
Tue, 28 Aug 2012 00:45:36 +0000 (20:45 -0400)
committerMichael Gapczynski <mtgap@owncloud.com>
Tue, 28 Aug 2012 00:45:36 +0000 (20:45 -0400)
settings/js/admin.js

index 8b1494881a544f25259272e58ede8d39a697e97b..23f445b708f86252bf7abe6e823d2bde634710b8 100644 (file)
@@ -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