diff options
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/js/settings.js | 5 | ||||
-rw-r--r-- | apps/files_external/templates/settings.php | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index fc6edefc648..da3e2397b7e 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -945,6 +945,11 @@ MountConfigListView.prototype = _.extend({ $tr.find('.configuration').text(t('files_external', 'Admin defined')); } }); + var mainForm = $('#files_external'); + if (result.length === 0 && mainForm.attr('data-can-create') === 'false') { + mainForm.hide(); + $('a[href="#external-storage"]').parent().hide(); + } onCompletion.resolve(); } }); diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 47230f98bd3..2581259c4ca 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -87,7 +87,7 @@ } ?> -<form id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>"> +<form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>"> <h2><?php p($l->t('External Storage')); ?></h2> <?php if (isset($_['dependencies']) and ($_['dependencies']<>'') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?> <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'> |