Bug 28786: (follow-up) Improve style of 2FA code input

This patch cleans up login.css a little bit so that the same style rules
which apply to the login screen apply to the 2FA input form as well.

The patch also changes the "Log out" link on the 2FA form to a "Cancel"
link alongside the "Verify" button.

To test, apply the patch and start the process of logging in to the
staff client using an account with 2FA enabled.

On both the login form and 2FA code views, confirm that everything is
styled consistently.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Owen Leonard 2022-04-12 16:32:20 +00:00 committed by Fridolin Somers
parent c09e312913
commit 267101a792
2 changed files with 25 additions and 28 deletions

View File

@ -92,14 +92,6 @@ label {
overflow: hidden;
}
#login input {
padding: 3px;
}
#login select {
width: 98%;
}
#login ul {
list-style: none;
margin: 0;
@ -112,15 +104,6 @@ label {
text-align: center;
}
#login #userid, #password {
font-size: 1.7em;
width: 97%;
}
#login #branch, #login #desk_id {
width : 99%;
}
#login #submit-button, #login .button {
font-size: 1.4em;
padding : .3em .6em;
@ -173,10 +156,20 @@ label {
}
textarea, input, select {
background: #f4f4f4;
border: 1px solid #b2b2b2;
color: #000;
font: 13px Verdana, Arial, Helvetica, sans-serif;
margin: 1px;
padding: 3px;
background: #f4f4f4;
border: 1px solid #b2b2b2;
color: #000;
font: 13px Verdana, Arial, Helvetica, sans-serif;
margin: 1px;
padding: 3px;
}
select {
width: 97%;
}
input[type='text'],
input[type='password'] {
font-size: 1.7em;
width: 97%;
}

View File

@ -143,13 +143,17 @@
<input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" />
[% END %]
[% IF invalid_otp_token %]
<div class="dialog error">Invalid two-factor code</div>
<div id="login_error">Invalid two-factor code</div>
[% END %]
<p><label for="otp_token">Two-factor authentication code:</label>
<input type="text" name="otp_token" id="otp_token" class="input focus" value="" size="20" tabindex="1" />
<p class="submit"><input id="submit-button" type="submit" value="Verify code" /></p>
<a class="logout" id="logout" href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log out</a>
<p>
<label for="otp_token">Two-factor authentication code:</label>
<input type="text" name="otp_token" id="otp_token" class="input focus" value="" size="20" tabindex="1" />
</p>
<p>
<input id="submit-button" type="submit" value="Verify code" />
<a class="cancel" id="logout" href="/cgi-bin/koha/mainpage.pl?logout.x=1">Cancel</a>
</p>
</form>
[% END %]