Add autofocus to the username input on the login page

This commit is contained in:
Valentin Samir
2016-09-06 11:55:54 +02:00
parent 7a86679281
commit 990f00fe3c
2 changed files with 12 additions and 1 deletions

View File

@ -100,7 +100,10 @@ class UserCredential(BaseLogin):
Form used on the login page to retrive user credentials
"""
#: The user username
username = forms.CharField(label=_('username'))
username = forms.CharField(
label=_('username'),
widget=forms.TextInput(attrs={'autofocus': 'autofocus'})
)
#: The user password
password = forms.CharField(label=_('password'), widget=forms.PasswordInput)
#: A checkbox to ask to be warn before emiting a ticket for another service