From 932c4ee927f278f4ef5275a9582bca8822310738 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 18 Feb 2014 16:36:02 +0100 Subject: Allow admins to disable certain external storages for users Fix issue #6793 --- apps/files_external/js/settings.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'apps/files_external/js') diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 895f97bd2c3..dbc9f548292 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -302,13 +302,23 @@ $(document).ready(function() { }); $('#allowUserMounting').bind('change', function() { + OC.msg.startSaving('#userMountingMsg'); if (this.checked) { OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'yes'); + $('#userMountingBackups').removeClass('hidden'); } else { OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'no'); + $('#userMountingBackups').addClass('hidden'); } + OC.msg.finishedSaving('#userMountingMsg', {status: 'success', data: {message: t('settings', 'Saved')}}); }); + $('input[name="allowUserMountingBackends\\[\\]"]').bind('change', function() { + OC.msg.startSaving('#userMountingMsg'); + var user_mounting_backends = $('input[name="allowUserMountingBackends\\[\\]"]:checked').map(function(){return $(this).val();}).get(); + OC.AppConfig.setValue('files_external', 'user_mounting_backends', user_mounting_backends.join()); + OC.msg.finishedSaving('#userMountingMsg', {status: 'success', data: {message: t('settings', 'Saved')}}); + }); }); })(); -- cgit v1.2.3