Advance to password field when Enter pressed on username, login page
This commit is contained in:
parent
051b52bd4b
commit
6bcfd0515f
|
@ -1,6 +1,14 @@
|
|||
|
||||
$(function() {
|
||||
|
||||
$('#username').keydown(function(event) {
|
||||
if (event.which == 13) {
|
||||
$('#password').focus().select();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
$('form').submit(function() {
|
||||
if (! $('#username').val()) {
|
||||
with ($('#username').get(0)) {
|
||||
|
|
|
@ -3,9 +3,13 @@
|
|||
|
||||
<%def name="title()">Login</%def>
|
||||
|
||||
<%def name="head_tags()">
|
||||
${parent.head_tags()}
|
||||
<%def name="extra_javascript()">
|
||||
${parent.extra_javascript()}
|
||||
${h.javascript_link(request.static_url('tailbone:static/js/login.js'))}
|
||||
</%def>
|
||||
|
||||
<%def name="extra_styles()">
|
||||
${parent.extra_styles()}
|
||||
${h.stylesheet_link(request.static_url('tailbone:static/css/login.css'))}
|
||||
</%def>
|
||||
|
||||
|
|
Loading…
Reference in a new issue