Skip to content
Snippets Groups Projects
Commit 14317202 authored by Jan-Christoph Borchardt's avatar Jan-Christoph Borchardt Committed by GitHub
Browse files

Merge pull request #1098 from nextcloud/2fa-challenge-styling

2fa challenge styling
parents 4d85ffc2 78bb02d2
No related branches found
No related tags found
No related merge requests found
...@@ -32,10 +32,17 @@ body { ...@@ -32,10 +32,17 @@ body {
background-size: cover; background-size: cover;
} }
.two-factor-header {
text-align: center;
}
.two-factor-provider { .two-factor-provider {
text-align: center; text-align: center;
width: 100%; width: 258px !important;
display: inline-block; display: inline-block;
margin-bottom: 0 !important;
background-color: rgba(0,0,0,0.3) !important;
border: none !important;
} }
a.two-factor-cancel { a.two-factor-cancel {
......
<fieldset class="warning"> <div class="warning">
<legend><strong><?php p($l->t('Two-step verification')) ?></strong></legend> <h2 class="two-factor-header"><?php p($l->t('Two-factor authentication')) ?></h2>
<p><?php p($l->t('Enhanced security has been enabled for your account. Please authenticate using a second factor.')) ?></p> <p><?php p($l->t('Enhanced security is enabled for your account. Please authenticate using a second factor.')) ?></p>
</fieldset> <p>
<fieldset class="warning"> <ul>
<ul> <?php foreach ($_['providers'] as $provider): ?>
<?php foreach ($_['providers'] as $provider): ?> <li>
<li> <a class="button two-factor-provider"
<a class="two-factor-provider" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', [
[ 'challengeProviderId' => $provider->getId(),
'challengeProviderId' => $provider->getId(), 'redirect_url' => $_['redirect_url'],
'redirect_url' => $_['redirect_url'], ]
] )) ?>">
)) ?>"> <?php p($provider->getDescription()) ?>
<?php p($provider->getDescription()) ?> </a>
</a> </li>
</li> <?php endforeach; ?>
<?php endforeach; ?> </ul>
</ul> </p>
</fieldset> </div>
<a class="two-factor-cancel" <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel login')) ?></a> <a class="two-factor-cancel" <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel log in')) ?></a>
...@@ -9,12 +9,11 @@ $provider = $_['provider']; ...@@ -9,12 +9,11 @@ $provider = $_['provider'];
$template = $_['template']; $template = $_['template'];
?> ?>
<fieldset class="warning"> <div class="warning">
<legend><strong><?php p($provider->getDisplayName()); ?></strong></legend> <h2 class="two-factor-header"><?php p($provider->getDisplayName()); ?></h2>
<p><?php p($l->t('Please authenticate using the selected factor.')) ?></p> <?php if ($error): ?>
</fieldset> <p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p>
<?php if ($error): ?> <?php endif; ?>
<span class="warning"><?php p($l->t('An error occured while verifying the token')); ?></span> <?php print_unescaped($template); ?>
<?php endif; ?> </div>
<?php print_unescaped($template); ?> <a class="two-factor-cancel" <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel log in')) ?></a>
<a class="two-factor-cancel" <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel login')) ?></a>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment