pass verified status to template

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
pull/3869/head
Bjoern Schiessle 8 years ago committed by Morris Jobke
parent 391a989a91
commit 5c202884e9
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
  1. 4
      settings/personal.php
  2. 44
      settings/templates/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('twitterScope', $userData[\OC\Accounts\AccountManager::PROPERTY_TWITTER]['scope']);
$tmpl->assign('addressScope', $userData[\OC\Accounts\AccountManager::PROPERTY_ADDRESS]['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('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser()));
$tmpl->assign('certs', $certificateManager->listCertificates()); $tmpl->assign('certs', $certificateManager->listCertificates());
$tmpl->assign('showCertificates', $enableCertImport); $tmpl->assign('showCertificates', $enableCertImport);

@ -111,7 +111,19 @@
<label for="email"><?php p($l->t('Email')); ?></label> <label for="email"><?php p($l->t('Email')); ?></label>
<span class="icon-password"/> <span class="icon-password"/>
</h2> </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']); ?>" <input type="email" name="email" id="email" value="<?php p($_['email']); ?>"
<?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?>
placeholder="<?php p($l->t('Your email address')); ?>" placeholder="<?php p($l->t('Your email address')); ?>"
@ -164,7 +176,20 @@
<label for="website"><?php p($l->t('Website')); ?></label> <label for="website"><?php p($l->t('Website')); ?></label>
<span class="icon-password"/> <span class="icon-password"/>
</h2> </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']); ?>" <input type="text" name="website" id="website" value="<?php p($_['website']); ?>"
placeholder="<?php p($l->t('Your website')); ?>" placeholder="<?php p($l->t('Your website')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" /> autocomplete="on" autocapitalize="none" autocorrect="off" />
@ -178,7 +203,20 @@
<label for="twitter"><?php p($l->t('Twitter')); ?></label> <label for="twitter"><?php p($l->t('Twitter')); ?></label>
<span class="icon-password"/> <span class="icon-password"/>
</h2> </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']); ?>" <input type="text" name="twitter" id="twitter" value="<?php p($_['twitter']); ?>"
placeholder="<?php p($l->t('Your Twitter handle')); ?>" placeholder="<?php p($l->t('Your Twitter handle')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" /> autocomplete="on" autocapitalize="none" autocorrect="off" />

Loading…
Cancel
Save