Fix auto-focus username for login form
This commit is contained in:
parent
f71eadd409
commit
15fb7f45b8
2 changed files with 14 additions and 0 deletions
|
@ -122,6 +122,10 @@ class AuthenticationView(View):
|
|||
'tailbone', 'main_image_url',
|
||||
default=self.request.static_url('tailbone:static/img/home_logo.png'))
|
||||
|
||||
# nb. hacky..but necessary, to add the ref, for autofocus
|
||||
dform = form.make_deform_form()
|
||||
dform['username'].widget.attributes = {'ref': 'username'}
|
||||
|
||||
return {
|
||||
'form': form,
|
||||
'referrer': referrer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue