Skip to content

Commit

Permalink
login: Focus the username field on load
Browse files Browse the repository at this point in the history
Wolfram wanted a small usability improvement that's easy to add: placing
the cursor automatically in the user name field when loading the login
page.

Suggested-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
  • Loading branch information
Damien Lespiau committed Sep 18, 2015
1 parent 7e1437e commit 634d972
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions patchwork/templates/patchwork/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
{% block title %}Login{% endblock %}
{% block heading %}Login{% endblock %}

{% block headers %}
<script type="text/javascript">
$(function() {
$('#id_username').focus()
});
</script>
{% endblock %}

{% block body %}
<form method="post">
Expand Down

0 comments on commit 634d972

Please sign in to comment.