summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-04-24 12:20:36 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-04-28 23:41:36 -0300
commit5c202884e9596a47d38f5432b66117bcca373dc6 (patch)
tree32612a8c1c1c0229212af06f9aec4cbc23434ad8 /settings
parent391a989a911befd9dba6318b40234f63bbd15db0 (diff)
downloadnextcloud-server-5c202884e9596a47d38f5432b66117bcca373dc6.tar.gz
nextcloud-server-5c202884e9596a47d38f5432b66117bcca373dc6.zip
pass verified status to template
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings')
-rw-r--r--settings/personal.php4
-rw-r--r--settings/templates/personal.php44
2 files changed, 45 insertions, 3 deletions
diff --git a/settings/personal.php b/settings/personal.php
index 6fbe95f9ea7..d81cdd7c2f3 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -185,6 +185,10 @@ $tmpl->assign('websiteScope', $userData[\OC\Accounts\AccountManager::PROPERTY_WE
$tmpl->assign('twitterScope', $userData[\OC\Accounts\AccountManager::PROPERTY_TWITTER]['scope']);
$tmpl->assign('addressScope', $userData[\OC\Accounts\AccountManager::PROPERTY_ADDRESS]['scope']);
+$tmpl->assign('websiteVerification', $userData[\OC\Accounts\AccountManager::PROPERTY_WEBSITE]['verified']);
+$tmpl->assign('twitterVerification', $userData[\OC\Accounts\AccountManager::PROPERTY_TWITTER]['verified']);
+$tmpl->assign('emailVerification', $userData[\OC\Accounts\AccountManager::PROPERTY_EMAIL]['verified']);
+
$tmpl->assign('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser()));
$tmpl->assign('certs', $certificateManager->listCertificates());
$tmpl->assign('showCertificates', $enableCertImport);
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index cea03fd1482..fade96f026e 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -111,7 +111,19 @@
<label for="email"><?php p($l->t('Email')); ?></label>
<span class="icon-password"/>
</h2>
- <span class="verify" id="verify-email">Verify</span>
+ <span class="verify" id="verify-email"><?php
+ switch($_['emailVerification']) {
+ case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
+ p('verification in progress');
+ break;
+ case \OC\Accounts\AccountManager::VERIFIED:
+ p('verified');
+ break;
+ default:
+ p('click to verify');
+ }
+ ?>
+ </span>
<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')); ?>"
@@ -164,7 +176,20 @@
<label for="website"><?php p($l->t('Website')); ?></label>
<span class="icon-password"/>
</h2>
- <span class="verify" id="verify-website">Verify</span>
+ <span class="verify" id="verify-website">
+ <?php
+ switch($_['websiteVerification']) {
+ case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
+ p('verification in progress');
+ break;
+ case \OC\Accounts\AccountManager::VERIFIED:
+ p('verified');
+ break;
+ default:
+ p('click to verify');
+ }
+ ?>
+ </span>
<input type="text" name="website" id="website" value="<?php p($_['website']); ?>"
placeholder="<?php p($l->t('Your website')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />
@@ -178,7 +203,20 @@
<label for="twitter"><?php p($l->t('Twitter')); ?></label>
<span class="icon-password"/>
</h2>
- <span class="verify" id="verify-twitter">Verify</span>
+ <span class="verify" id="verify-twitter">
+ <?php
+ switch($_['twitterVerification']) {
+ case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
+ p('verification in progress');
+ break;
+ case \OC\Accounts\AccountManager::VERIFIED:
+ p('verified');
+ break;
+ default:
+ p('click to verify');
+ }
+ ?>
+ </span>
<input type="text" name="twitter" id="twitter" value="<?php p($_['twitter']); ?>"
placeholder="<?php p($l->t('Your Twitter handle')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />