hide files external in personal settings if it's empty
This commit is contained in:
parent
d2edd38155
commit
cc422e556b
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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)); ?>'>
|
||||
|
|
Loading…
Reference in New Issue