diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-06-07 15:01:54 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-06-07 11:43:27 -0500 |
commit | ee53a2ed422f5014bef96f54e91bd00a19e78932 (patch) | |
tree | 8fcc614194b3b3f3c6f641342b2b6fc81ed6da1e /settings | |
parent | 3ba2d6179a5b17fce6b976885f77e78a31ceec5f (diff) | |
download | nextcloud-server-ee53a2ed422f5014bef96f54e91bd00a19e78932.tar.gz nextcloud-server-ee53a2ed422f5014bef96f54e91bd00a19e78932.zip |
show input fields if they are not empty but disable them in global scale mode
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/templates/personal.php | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 714007afbb6..d492e05d203 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -131,41 +131,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 +199,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 +244,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 } ?> |