Skip to content
Snippets Groups Projects
Commit f574f13e authored by Julian's avatar Julian
Browse files

mfa ui enhancements

parent 29a60b3f
Branches
Tags
No related merge requests found
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
<div class="text-center text-muted d-none webauthn-group mb-3">- or -</div> <div class="text-center text-muted d-none webauthn-group mb-3">- or -</div>
{% endif %} {% endif %}
<div class="form-group col-12 mb-2"> <div class="form-group col-12 mb-2">
<input type="text" class="form-control" id="mfa-code" name="code" required="required" tabindex="1" placeholder="Code from your authenticator app or recovery code"> <input type="text" class="form-control" id="mfa-code" name="code" required="required" placeholder="Code from your authenticator app or recovery code" autocomplete="off" autofocus>
</div> </div>
<div class="form-group col-12"> <div class="form-group col-12">
<button type="submit" class="btn btn-primary btn-block" tabindex="2">Verify</button> <button type="submit" class="btn btn-primary btn-block">Verify</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -105,6 +105,7 @@ function begin_webauthn() { ...@@ -105,6 +105,7 @@ function begin_webauthn() {
$('#webauthn-btn').on('click', begin_webauthn); $('#webauthn-btn').on('click', begin_webauthn);
if (typeof(PublicKeyCredential) != "undefined") { if (typeof(PublicKeyCredential) != "undefined") {
$('.webauthn-group').removeClass('d-none'); $('.webauthn-group').removeClass('d-none');
begin_webauthn();
} else { } else {
$('#webauthn-unsupported').removeClass('d-none'); $('#webauthn-unsupported').removeClass('d-none');
} }
......
...@@ -80,7 +80,7 @@ You need to setup at least one authentication method to enable two-factor authen ...@@ -80,7 +80,7 @@ You need to setup at least one authentication method to enable two-factor authen
<div class="row m-0"> <div class="row m-0">
<label class="sr-only" for="totp-name">Name</label> <label class="sr-only" for="totp-name">Name</label>
<input type="text" name="name" class="form-control mb-2 col-12 col-lg-auto mr-2" style="width: 15em;" id="totp-name" placeholder="Name" required {{ 'disabled' if mfa_init }}> <input type="text" name="name" class="form-control mb-2 col-12 col-lg-auto mr-2" style="width: 15em;" id="totp-name" placeholder="Name" required {{ 'disabled' if mfa_init }}>
<button type="submit" id="totp-submit" class="btn btn-primary mb-2 col" {{ 'disabled' if mfa_init }}>Setup new authenticator</button> <button type="submit" id="totp-submit" class="btn btn-primary mb-2 col" {{ 'disabled' if mfa_init }}>Setup new app</button>
</div> </div>
</form> </form>
...@@ -154,7 +154,7 @@ You need to setup at least one authentication method to enable two-factor authen ...@@ -154,7 +154,7 @@ You need to setup at least one authentication method to enable two-factor authen
{% endfor %} {% endfor %}
{% if not webauthn_methods %} {% if not webauthn_methods %}
<tr class="table-secondary"> <tr class="table-secondary">
<td colspan=3 class="text-center">No devices registered yet</td> <td colspan=3 class="text-center">No U2F/FIDO2 devices registered yet</td>
</tr> </tr>
{% endif %} {% endif %}
</tbody> </tbody>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<div class="form-group col-12"> <div class="form-group col-12">
<label for="user-loginname">Login Name</label> <label for="user-loginname">Login Name</label>
<input type="text" class="form-control" id="user-loginname" name="loginname" required="required" tabindex = "1"> <input type="text" class="form-control" id="user-loginname" name="loginname" required="required" tabindex = "1" autofocus>
</div> </div>
<div class="form-group col-12"> <div class="form-group col-12">
<label for="user-password1">Password</label> <label for="user-password1">Password</label>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment