summaryrefslogtreecommitdiffstats
path: root/apps/settings/templates
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-03-23 11:38:25 +0100
committerVincent Petry <vincent@nextcloud.com>2021-03-26 13:07:08 +0100
commit9fb447ea427428c86a8d6be77d0145f4fb0ed777 (patch)
treeb8aa943599cf02618d532f18ea7aadb2d1fdadb0 /apps/settings/templates
parentb81a1c1bdbf7c7ca3e71a7c7cd7eb21edd0a3fb9 (diff)
downloadnextcloud-server-9fb447ea427428c86a8d6be77d0145f4fb0ed777.tar.gz
nextcloud-server-9fb447ea427428c86a8d6be77d0145f4fb0ed777.zip
Adjust scopes menu based on conditions
Now not all fields have the "v2-private" option in place. Fix dropdown issue when a scope was stored that is not listed after disabling the lookup server. Whenever the lookup server upload is disabled, the scope menu is now displayed where it makes sense to allow switching between the two private scopes. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/settings/templates')
-rw-r--r--apps/settings/templates/settings/personal/personal.info.php16
1 files changed, 3 insertions, 13 deletions
diff --git a/apps/settings/templates/settings/personal/personal.info.php b/apps/settings/templates/settings/personal/personal.info.php
index 84198b3c0c4..60db8c85333 100644
--- a/apps/settings/templates/settings/personal/personal.info.php
+++ b/apps/settings/templates/settings/personal/personal.info.php
@@ -34,8 +34,8 @@ script('settings', [
]);
?>
-<div id="personal-settings">
- <div id="personal-settings-avatar-container" class="personal-settings-container">
+<div id="personal-settings" data-lookup-server-upload-enabled="<?php p($_['lookupServerUploadEnabled'] ? 'true' : 'false') ?>">
+<div id="personal-settings-avatar-container" class="personal-settings-container">
<div>
<form id="avatarform" class="section" method="post" action="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.postAvatar')); ?>">
<h3>
@@ -68,9 +68,7 @@ script('settings', [
</div>
<span class="icon-checkmark hidden"></span>
<span class="icon-error hidden" ></span>
- <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="avatarscope" value="<?php p($_['avatarScope']) ?>">
- <?php } ?>
</form>
</div>
<div class="personal-settings-setting-box personal-settings-group-box section">
@@ -125,7 +123,7 @@ script('settings', [
<span class="icon-checkmark hidden"></span>
<span class="icon-error hidden" ></span>
<?php if ($_['lookupServerUploadEnabled']) { ?>
- <input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>">
+ <input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>">
<?php } ?>
</form>
</div>
@@ -198,9 +196,7 @@ script('settings', [
autocomplete="on" autocapitalize="none" autocorrect="off" />
<span class="icon-checkmark hidden"></span>
<span class="icon-error hidden" ></span>
- <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="phonescope" value="<?php p($_['phoneScope']) ?>">
- <?php } ?>
</form>
</div>
<?php } ?>
@@ -223,9 +219,7 @@ script('settings', [
autocomplete="on" autocapitalize="none" autocorrect="off" />
<span class="icon-checkmark hidden"></span>
<span class="icon-error hidden" ></span>
- <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="addressscope" value="<?php p($_['addressScope']) ?>">
- <?php } ?>
</form>
</div>
<?php } ?>
@@ -279,9 +273,7 @@ script('settings', [
/>
<span class="icon-checkmark hidden"></span>
<span class="icon-error hidden" ></span>
- <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="websitescope" value="<?php p($_['websiteScope']) ?>">
- <?php } ?>
</form>
</div>
<?php } ?>
@@ -335,9 +327,7 @@ script('settings', [
/>
<span class="icon-checkmark hidden"></span>
<span class="icon-error hidden" ></span>
- <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="twitterscope" value="<?php p($_['twitterScope']) ?>">
- <?php } ?>
</form>
</div>
<?php } ?>