Giving focus on username field on log in page

Added autofocus on the username input.

Change-Id: I32f34ac2410919c4f2bacac0eceb8668cb3ee08e
Closes-Bug: #1225662
This commit is contained in:
Robert Mizielski 2013-10-03 15:43:34 +02:00
parent 259c57b5b6
commit f511f81b4f
1 changed files with 3 additions and 1 deletions

View File

@ -46,7 +46,9 @@ class Login(AuthenticationForm):
class for added security features.
"""
region = forms.ChoiceField(label=_("Region"), required=False)
username = forms.CharField(label=_("User Name"))
username = forms.CharField(
label=_("User Name"),
widget=forms.TextInput(attrs={"autofocus": "autofocus"}))
password = forms.CharField(label=_("Password"),
widget=forms.PasswordInput(render_value=False))