summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-06-13 18:14:41 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-06-13 18:14:41 +0200
commit86e1d8ca54e9cbc3c33621f15abcf22fc3dcbec9 (patch)
tree14a55bdb8bfaaf2751b21d5cbe301561186b067f /apps/files_external
parentc09f5680c98d66d6e5a0fe793561194ecafed3ea (diff)
downloadnextcloud-server-86e1d8ca54e9cbc3c33621f15abcf22fc3dcbec9.tar.gz
nextcloud-server-86e1d8ca54e9cbc3c33621f15abcf22fc3dcbec9.zip
AllowUserMount defaults now to all backends fixes #7958
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/css/settings.css4
-rw-r--r--apps/files_external/js/settings.js9
2 files changed, 13 insertions, 0 deletions
diff --git a/apps/files_external/css/settings.css b/apps/files_external/css/settings.css
index 01dd5aece8c..ea0b70ea596 100644
--- a/apps/files_external/css/settings.css
+++ b/apps/files_external/css/settings.css
@@ -25,3 +25,7 @@ tr:hover>td.remove>img { visibility:visible; cursor:pointer; }
#externalStorage td.status .success {
border-radius: 50%;
}
+
+#userMountingBackups {
+ padding-left: 25px;
+}
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 00793a614c2..29081772d68 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -310,7 +310,9 @@ $(document).ready(function() {
OC.msg.startSaving('#userMountingMsg');
if (this.checked) {
OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'yes');
+ $('input[name="allowUserMountingBackends\\[\\]"]').prop('checked', true);
$('#userMountingBackups').removeClass('hidden');
+ $($('input[name="allowUserMountingBackends\\[\\]"]')[0]).trigger('change');
} else {
OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'no');
$('#userMountingBackups').addClass('hidden');
@@ -323,6 +325,13 @@ $(document).ready(function() {
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')}});
+
+ // disable allowUserMounting
+ if(user_mounting_backends.length === 0) {
+ $('#allowUserMounting').prop('checked', false);
+ $('#allowUserMounting').trigger('change');
+
+ }
});
});