Add tabindexes to login elements (#420)

Fixes issue with password managers (e.g. KeePass) tabbing to 'Forgot your password?' link instead of password field.
This commit is contained in:
JodanJodan 2017-12-02 05:31:52 -06:00 committed by Anna-Maria Meriniemi
parent 7f9dc622b1
commit 052a038763
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@
<div class="row"> <div class="row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
{{ render_field(form.username, class_='form-control', placeholder='Username', autofocus='') }} {{ render_field(form.username, class_='form-control', placeholder='Username', autofocus='', tabindex='1') }}
</div> </div>
</div> </div>
@ -32,7 +32,7 @@
</small> </small>
{% endif%} {% endif%}
{{ form.password(title=form.password.description, class_='form-control') | safe }} {{ form.password(title=form.password.description, class_='form-control', tabindex='2') | safe }}
{% if form.password.errors %} {% if form.password.errors %}
<div class="help-block"> <div class="help-block">
{% if form.password.errors|length < 2 %} {% if form.password.errors|length < 2 %}
@ -54,7 +54,7 @@
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<input type="submit" value="Login" class="btn btn-primary"> <input type="submit" value="Login" class="btn btn-primary" tabindex="3">
</div> </div>
</div> </div>
</form> </form>