diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-05-05 18:42:28 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-05-05 18:42:28 -0400 |
commit | d0988dc33088b8aedb6e4b3ae2636b13c0d744f5 (patch) | |
tree | 6ffaa2e94758b1faa8a972446a27832dde2daaa3 | |
parent | 9c56383cd0525d0e6e5463e1c8a70d2e9d66fd99 (diff) | |
download | askbot-d0988dc33088b8aedb6e4b3ae2636b13c0d744f5.tar.gz askbot-d0988dc33088b8aedb6e4b3ae2636b13c0d744f5.tar.bz2 askbot-d0988dc33088b8aedb6e4b3ae2636b13c0d744f5.zip |
added auto-focus to the registration page
-rw-r--r-- | askbot/templates/authopenid/complete.html | 3 | ||||
-rw-r--r-- | askbot/utils/forms.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/askbot/templates/authopenid/complete.html b/askbot/templates/authopenid/complete.html index 835fd72f..becd1517 100644 --- a/askbot/templates/authopenid/complete.html +++ b/askbot/templates/authopenid/complete.html @@ -76,5 +76,8 @@ anyone, must be valid</i>) {% endblock %} <!-- end complete.html --> {% block endjs %} + <script type="text/javascript"> + $('#id_username').focus(); + </script> {{ macros.one_shot_form_js(form='#register-form', submit_button='#register-button') }} {% endblock %} diff --git a/askbot/utils/forms.py b/askbot/utils/forms.py index c799ff56..9ff50506 100644 --- a/askbot/utils/forms.py +++ b/askbot/utils/forms.py @@ -121,7 +121,7 @@ class UserNameField(StrippedNonEmptyCharField): max_length = MAX_USERNAME_LENGTH() super(UserNameField,self).__init__( max_length=max_length, - widget=forms.TextInput(attrs=login_form_widget_attrs), + widget=forms.TextInput(attrs=widget_attrs), label=label, error_messages=error_messages, **kw |