server/core/templates/twofactorshowchallenge.php

48 lines
1.4 KiB
PHP
Raw Normal View History

2016-05-11 09:23:25 +00:00
<?php
/** @var $l \OCP\IL10N */
2016-05-11 09:23:25 +00:00
/** @var $_ array */
/* @var $error boolean */
$error = $_['error'];
/* @var $error_message string */
$error_message = $_['error_message'];
2016-05-11 09:23:25 +00:00
/* @var $provider OCP\Authentication\TwoFactorAuth\IProvider */
$provider = $_['provider'];
/* @var $template string */
$template = $_['template'];
?>
2016-08-26 21:20:00 +00:00
<div class="warning">
<h2 class="two-factor-header"><?php p($provider->getDisplayName()); ?></h2>
<?php if ($error): ?>
<?php if($error_message): ?>
<p><strong><?php p($error_message); ?></strong></p>
<?php else: ?>
<p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p>
<?php endif; ?>
<?php endif; ?>
<?php print_unescaped($template); ?>
<ul>
<?php if (!is_null($_['backupProvider'])): ?>
<li>
<a class="two-factor-provider two-factor-secondary" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
[
'challengeProviderId' => $_['backupProvider']->getId(),
'redirect_url' => $_['redirect_url'],
]
)) ?>">
<div>
<p><?php p($l->t('Use backup code')) ?></p>
</div>
</a>
</li>
2016-08-26 21:20:00 +00:00
<?php endif; ?>
<li>
<a class="two-factor-provider two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
<div>
<p><?php p($l->t('Cancel log in')) ?></p>
</div>
</a>
</li>
</ul>
2016-08-26 21:20:00 +00:00
</div>