Skip to content

Commit

Permalink
On the login page, focus on the password field.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanv committed Dec 14, 2011
1 parent 8463841 commit c7b2a07
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 10 additions & 1 deletion IPython/frontend/html/notebook/templates/login.html
Expand Up @@ -2,7 +2,16 @@

{% block content_panel %}
<form action="/login?next={{url_escape(next)}}" method="post">
Password: <input type="password" name="password">
Password: <input type="password" name="password" id="focus">
<input type="submit" value="Sign in" id="signin">
</form>
{% end %}

{% block script %}
<script type="text/javascript">
$(document).ready(function() {
IPython.login_widget = new IPython.LoginWidget('span#login_widget');
$('#focus').focus();
});
</script>
{% end %}
8 changes: 8 additions & 0 deletions IPython/frontend/html/notebook/templates/logout.html
Expand Up @@ -7,3 +7,11 @@
Proceed to the <a href="/login">login page</a>.
{% end %}
{% end %}

{% block script %}
<script type="text/javascript">
$(document).ready(function() {
IPython.login_widget = new IPython.LoginWidget('span#login_widget');
});
</script>
{% end %}

0 comments on commit c7b2a07

Please sign in to comment.