Autofocus the username field on user creation

On a page with the single purpose to enter new user data, we should
auto-focus the username field. It is very annoying to have to click in
that field before starting to type. Theoretically, there is the "autofocus"
attribute in html5, but IE does not support that.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-11-26 21:38:29 +01:00
parent fa2f6ba162
commit a3009452fa

View File

@ -42,4 +42,6 @@
</div>
</div>
</form>
<!-- Focus the username field by default -->
<script>$(document).ready(function(){$("#username").focus();});</script>
{% endblock %}