diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-12-12 10:20:35 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-03-06 10:48:26 +0100 |
commit | 511df0ec99ddc8beb855d8741b3a0dec569bed5e (patch) | |
tree | a3587fab843f00fb5371a4cfe981253899d5fef8 /core | |
parent | 15673bc6011f6a8b934e251df4ac9cff6c37c465 (diff) | |
download | nextcloud-server-511df0ec99ddc8beb855d8741b3a0dec569bed5e.tar.gz nextcloud-server-511df0ec99ddc8beb855d8741b3a0dec569bed5e.zip |
Move log out and back codes link into 2fa box for better readability
Fixes https://github.com/nextcloud/server/issues/2538
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core')
-rw-r--r-- | core/templates/twofactorselectchallenge.php | 21 | ||||
-rw-r--r-- | core/templates/twofactorshowchallenge.php | 27 |
2 files changed, 27 insertions, 21 deletions
diff --git a/core/templates/twofactorselectchallenge.php b/core/templates/twofactorselectchallenge.php index 5cfba8bcb47..813d1572884 100644 --- a/core/templates/twofactorselectchallenge.php +++ b/core/templates/twofactorselectchallenge.php @@ -18,13 +18,16 @@ <?php endforeach; ?> </ul> </p> + <p class="two-factor-link"> + <a <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel log in')) ?></a> + <?php if (!is_null($_['backupProvider'])): ?> + <br> + <a href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', + [ + 'challengeProviderId' => $_['backupProvider']->getId(), + 'redirect_url' => $_['redirect_url'], + ] + )) ?>"><?php p($l->t('Use backup code')) ?></a> + <?php endif; ?> + </p> </div> -<a class="two-factor-link" <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel log in')) ?></a> -<?php if (!is_null($_['backupProvider'])): ?> -<a class="two-factor-link" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', - [ - 'challengeProviderId' => $_['backupProvider']->getId(), - 'redirect_url' => $_['redirect_url'], - ] - )) ?>"><?php p($l->t('Use backup code')) ?></a> -<?php endif; diff --git a/core/templates/twofactorshowchallenge.php b/core/templates/twofactorshowchallenge.php index 4f3741b5dfe..815406fd899 100644 --- a/core/templates/twofactorshowchallenge.php +++ b/core/templates/twofactorshowchallenge.php @@ -12,22 +12,25 @@ $template = $_['template']; ?> <div class="warning"> - <h2 class="two-factor-header"><?php p($provider->getDisplayName()); ?></h2> - <?php if ($error): ?> + <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); ?> + <p class="two-factor-link"> + <a <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel log in')) ?></a> + <?php if (!is_null($_['backupProvider'])): ?> + <br> + <a href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', + [ + 'challengeProviderId' => $_['backupProvider']->getId(), + 'redirect_url' => $_['redirect_url'], + ] + )) ?>"><?php p($l->t('Use backup code')) ?></a> <?php endif; ?> - <?php print_unescaped($template); ?> + </p> </div> -<a class="two-factor-link" <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel log in')) ?></a> -<?php if (!is_null($_['backupProvider'])): ?> -<a class="two-factor-link" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', - [ - 'challengeProviderId' => $_['backupProvider']->getId(), - 'redirect_url' => $_['redirect_url'], - ] - )) ?>"><?php p($l->t('Use backup code')) ?></a> -<?php endif; |