diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-09-17 17:00:15 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-23 12:10:02 +0200 |
commit | 2bef3ef34bc81737c1667187aa3b21ecf1442e03 (patch) | |
tree | 249a1945b90c224444c1b3a5490a32f9d94b10c3 /apps/files_external/templates | |
parent | 060d16961596b24a2d0cf9e30408482ce33cefe6 (diff) | |
download | nextcloud-server-2bef3ef34bc81737c1667187aa3b21ecf1442e03.tar.gz nextcloud-server-2bef3ef34bc81737c1667187aa3b21ecf1442e03.zip |
Hide deprecated backends in external storage GUI
Selecting/deselecting the deprecate-to backends in the user mountable
storages selection will also change the corresponding deprecated
backend.
Diffstat (limited to 'apps/files_external/templates')
-rw-r--r-- | apps/files_external/templates/settings.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index d8b07273028..141994d0050 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -157,6 +157,7 @@ }); ?> <?php foreach ($sortedBackends as $backend): ?> + <?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends ?> <option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option> <?php endforeach; ?> </select> @@ -197,8 +198,12 @@ <p id="userMountingBackends"<?php if ($_['allowUserMounting'] != 'yes'): ?> class="hidden"<?php endif; ?>> <?php p($l->t('Allow users to mount the following external storage')); ?><br /> <?php $i = 0; foreach ($_['userBackends'] as $backend): ?> - <input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) print_unescaped(' checked="checked"'); ?> /> - <label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend->getText()); ?></label> <br /> + <?php if ($deprecateTo = $backend->getDeprecateTo()): ?> + <input type="hidden" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" data-deprecate-to="<?php p($deprecateTo->getIdentifier()); ?>" /> + <?php else: ?> + <input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) print_unescaped(' checked="checked"'); ?> /> + <label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend->getText()); ?></label> <br /> + <?php endif; ?> <?php $i++; ?> <?php endforeach; ?> </p> |