diff --git a/application/forms/Authentication/TwoFactorChallengeForm.php b/application/forms/Authentication/TwoFactorChallengeForm.php index 88d9bc31f..884205089 100644 --- a/application/forms/Authentication/TwoFactorChallengeForm.php +++ b/application/forms/Authentication/TwoFactorChallengeForm.php @@ -12,10 +12,14 @@ use Icinga\Authentication\TwoFactorState; use Icinga\Exception\Http\HttpBadRequestException; use Icinga\Web\Session; use Icinga\Web\Url; +use ipl\Html\Attributes; use ipl\Html\FormDecoration\RenderElementDecorator; +use ipl\Html\HtmlElement; +use ipl\Html\Text; use ipl\Web\Common\CsrfCounterMeasure; use ipl\Web\Common\FormUid; use ipl\Web\Compat\CompatForm; +use ipl\Web\Widget\Icon; class TwoFactorChallengeForm extends CompatForm { @@ -57,12 +61,14 @@ class TwoFactorChallengeForm extends CompatForm 'label' => $this->translate('Verify') ]); - $this->addElement('submit', static::SUBMIT_CANCEL, [ - 'ignore' => true, - 'formnovalidate' => true, - 'class' => 'btn-cancel', - 'label' => $this->translate('Cancel'), - 'data-progress-label' => $this->translate('Canceling') + $this->addElement('submitButton', static::SUBMIT_CANCEL, [ + 'ignore' => true, + 'formnovalidate' => true, + 'class' => 'btn-back-to-login-link', + 'label' => [ + new Icon('arrow-left'), + HtmlElement::create('p', Attributes::create(), Text::create($this->translate('Back to login'))) + ] ]); $this->addElement('hidden', 'redirect', ['value' => Url::fromRequest()->getParam('redirect')]); diff --git a/public/css/icinga/login.less b/public/css/icinga/login.less index 1db812bb6..8b4ba0206 100644 --- a/public/css/icinga/login.less +++ b/public/css/icinga/login.less @@ -110,15 +110,23 @@ background-color: @icinga-secondary-dark; } - &.btn-cancel { - background: @gray; - //background: transparent; - //border: 2px solid @icinga-secondary; - //color: @icinga-secondary; + &.btn-back-to-login-link { + width: fit-content; + height: fit-content; + margin: 0 auto; + padding: 0; + background: none; + + p { + margin: 0; + } &:hover { - background-color: @icinga-secondary; - color: white; + opacity: 0.8; + + p { + text-decoration: underline; + } } } }