]> git.ozlabs.org Git - patchwork/commitdiff
login: Focus the username field on load master
authorDamien Lespiau <damien.lespiau@intel.com>
Mon, 24 Aug 2015 14:25:42 +0000 (15:25 +0100)
committerDamien Lespiau <damien.lespiau@intel.com>
Fri, 18 Sep 2015 15:49:26 +0000 (16:49 +0100)
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>
patchwork/templates/patchwork/login.html

index 2dfc2a7bb8498ef843933e45744597c76ddfef05..1f000e7df95b15e7005529aedd744deb846d4ff4 100644 (file)
@@ -3,6 +3,13 @@
 {% block title %}Login{% endblock %}
 {% block heading %}Login{% endblock %}
 
 {% 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">
 
 {% block body %}
 <form method="post">