Skip to content

Commit

Permalink
Adding inputmode and pattern to TOTP and Fallback input
Browse files Browse the repository at this point in the history
Fixes #88
  • Loading branch information
oliwarner committed Jun 7, 2024
1 parent 6e771da commit 00be66e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion multifactor/templates/multifactor/TOTP/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
<input type="hidden" name="key" value="{{secret_key|safe}}">

<div class="field"><div class="control">
<input class="input is-primary has-text-centered is-large" type="text" maxlength="6" size="6" name="answer" placeholder="e.g 123456" autocomplete="off" autofocus>
<input class="input is-primary has-text-centered is-large" type="text" maxlength="6" size="6" name="answer" placeholder="e.g 123456" autocomplete="off"
inputmode="numeric" pattern="[0-9]{6}" autofocus>
</div></div>

<button type="submit" class="button is-primary is-large is-fullwidth">Verify</button>
Expand Down
2 changes: 1 addition & 1 deletion multifactor/templates/multifactor/fallback/auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% csrf_token %}

<div class="field"><div class="control">
<input class="input is-primary has-text-centered is-large" type="text" maxlength="8" size="8" name="otp" placeholder="e.g 12345678" autocomplete="off" autofocus>
<input class="input is-primary has-text-centered is-large" type="text" maxlength="8" size="8" name="otp" placeholder="e.g 12345678" autocomplete="off" inputmode="numeric" pattern="[0-9]+" autofocus>
</div></div>

<button type="submit" class="button is-primary is-large is-fullwidth">Verify</button>
Expand Down

0 comments on commit 00be66e

Please sign in to comment.