Merge pull request #5287 from nextcloud/personal-page-gs-mode
show input fields if they are not empty but disable them in global scale mode
This commit is contained in:
commit
3384c5fb70
2 changed files with 39 additions and 16 deletions
|
@ -191,6 +191,13 @@ input#openid, input#webdav {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#personal-settings-container input:disabled {
|
||||
background-color: white;
|
||||
color: black;
|
||||
border: none;
|
||||
opacity: 100;
|
||||
}
|
||||
|
||||
.verification-dialog {
|
||||
display: none;
|
||||
right: -9px;
|
||||
|
|
|
@ -81,12 +81,9 @@
|
|||
<span class="icon-password"/>
|
||||
</h2>
|
||||
<input type="text" id="displayname" name="displayname"
|
||||
<?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?>
|
||||
<?php if(!$_['displayNameChangeSupported']) { print_unescaped('disabled="1"'); } ?>
|
||||
value="<?php p($_['displayName']) ?>"
|
||||
autocomplete="on" autocapitalize="none" autocorrect="off" />
|
||||
<?php if(!$_['displayNameChangeSupported']) { ?>
|
||||
<span><?php if(isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span>
|
||||
<?php } ?>
|
||||
<span class="icon-checkmark hidden"/>
|
||||
<?php if($_['lookupServerUploadEnabled']) { ?>
|
||||
<input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>">
|
||||
|
@ -114,13 +111,10 @@
|
|||
}
|
||||
?>">
|
||||
</div>
|
||||
<input type="email" name="email" id="email" value="<?php p($_['email']); ?>"
|
||||
<?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?>
|
||||
placeholder="<?php p($l->t('Your email address')); ?>"
|
||||
<input type="email" name="email" id="email" value="<?php if(!$_['displayNameChangeSupported'] && empty($_['email'])) p($l->t('No email address set')); else p($_['email']); ?>"
|
||||
<?php if(!$_['displayNameChangeSupported']) { print_unescaped('disabled="1"'); } ?>
|
||||
placeholder="<?php p($l->t('Your email address')) ?>"
|
||||
autocomplete="on" autocapitalize="none" autocorrect="off" />
|
||||
<?php if(!$_['displayNameChangeSupported']) { ?>
|
||||
<span><?php if(isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span>
|
||||
<?php } ?>
|
||||
<?php if($_['displayNameChangeSupported']) { ?>
|
||||
<br />
|
||||
<em><?php p($l->t('For password reset and notifications')); ?></em>
|
||||
|
@ -131,41 +125,50 @@
|
|||
<?php } ?>
|
||||
</form>
|
||||
</div>
|
||||
<?php if($_['lookupServerUploadEnabled']) { ?>
|
||||
<?php if (!empty($_['phone']) || $_['lookupServerUploadEnabled']) { ?>
|
||||
<div class="personal-settings-setting-box">
|
||||
<form id="phoneform" class="section">
|
||||
<h2>
|
||||
<label for="phone"><?php p($l->t('Phone number')); ?></label>
|
||||
<span class="icon-password"/>
|
||||
</h2>
|
||||
<input type="tel" id="phone" name="phone"
|
||||
value="<?php p($_['phone']) ?>"
|
||||
<input type="tel" id="phone" name="phone" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?>
|
||||
value="<?php p($_['phone']) ?>"
|
||||
placeholder="<?php p($l->t('Your phone number')); ?>"
|
||||
autocomplete="on" autocapitalize="none" autocorrect="off" />
|
||||
<span class="icon-checkmark hidden"/>
|
||||
<?php if($_['lookupServerUploadEnabled']) { ?>
|
||||
<input type="hidden" id="phonescope" value="<?php p($_['phoneScope']) ?>">
|
||||
<?php } ?>
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($_['address']) || $_['lookupServerUploadEnabled']) { ?>
|
||||
<div class="personal-settings-setting-box">
|
||||
<form id="addressform" class="section">
|
||||
<h2>
|
||||
<label for="address"><?php p($l->t('Address')); ?></label>
|
||||
<span class="icon-password"/>
|
||||
</h2>
|
||||
<input type="text" id="address" name="address"
|
||||
<input type="text" id="address" name="address" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?>
|
||||
placeholder="<?php p($l->t('Your postal address')); ?>"
|
||||
value="<?php p($_['address']) ?>"
|
||||
autocomplete="on" autocapitalize="none" autocorrect="off" />
|
||||
<span class="icon-checkmark hidden"/>
|
||||
<?php if($_['lookupServerUploadEnabled']) { ?>
|
||||
<input type="hidden" id="addressscope" value="<?php p($_['addressScope']) ?>">
|
||||
<?php } ?>
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($_['website']) || $_['lookupServerUploadEnabled']) { ?>
|
||||
<div class="personal-settings-setting-box">
|
||||
<form id="websiteform" class="section">
|
||||
<h2>
|
||||
<label for="website"><?php p($l->t('Website')); ?></label>
|
||||
<span class="icon-password"/>
|
||||
</h2>
|
||||
<?php if($_['lookupServerUploadEnabled']) { ?>
|
||||
<div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') p('hidden'); ?>">
|
||||
<img id="verify-website" title="<?php p($_['websiteMessage']); ?>" data-status="<?php p($_['websiteVerification']) ?>" src="
|
||||
<?php
|
||||
|
@ -190,19 +193,27 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<input type="text" name="website" id="website" value="<?php p($_['website']); ?>"
|
||||
placeholder="<?php p($l->t('Link https://…')); ?>"
|
||||
autocomplete="on" autocapitalize="none" autocorrect="off" />
|
||||
autocomplete="on" autocapitalize="none" autocorrect="off"
|
||||
<?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?>
|
||||
/>
|
||||
<span class="icon-checkmark hidden"/>
|
||||
<?php if($_['lookupServerUploadEnabled']) { ?>
|
||||
<input type="hidden" id="websitescope" value="<?php p($_['websiteScope']) ?>">
|
||||
<?php } ?>
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($_['twitter']) || $_['lookupServerUploadEnabled']) { ?>
|
||||
<div class="personal-settings-setting-box">
|
||||
<form id="twitterform" class="section">
|
||||
<h2>
|
||||
<label for="twitter"><?php p($l->t('Twitter')); ?></label>
|
||||
<span class="icon-password"/>
|
||||
</h2>
|
||||
<?php if($_['lookupServerUploadEnabled']) { ?>
|
||||
<div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') p('hidden'); ?>">
|
||||
<img id="verify-twitter" title="<?php p($_['twitterMessage']); ?>" data-status="<?php p($_['twitterVerification']) ?>" src="
|
||||
<?php
|
||||
|
@ -227,11 +238,16 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<input type="text" name="twitter" id="twitter" value="<?php p($_['twitter']); ?>"
|
||||
placeholder="<?php p($l->t('Twitter handle @…')); ?>"
|
||||
autocomplete="on" autocapitalize="none" autocorrect="off" />
|
||||
autocomplete="on" autocapitalize="none" autocorrect="off"
|
||||
<?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?>
|
||||
/>
|
||||
<span class="icon-checkmark hidden"/>
|
||||
<?php if($_['lookupServerUploadEnabled']) { ?>
|
||||
<input type="hidden" id="twitterscope" value="<?php p($_['twitterScope']) ?>">
|
||||
<?php } ?>
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
|
Loading…
Reference in a new issue