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() {
|
$(function() {
|
||||||
|
|
||||||
|
$('#username').keydown(function(event) {
|
||||||
|
if (event.which == 13) {
|
||||||
|
$('#password').focus().select();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
$('form').submit(function() {
|
$('form').submit(function() {
|
||||||
if (! $('#username').val()) {
|
if (! $('#username').val()) {
|
||||||
with ($('#username').get(0)) {
|
with ($('#username').get(0)) {
|
||||||
|
|
|
@ -3,9 +3,13 @@
|
||||||
|
|
||||||
<%def name="title()">Login</%def>
|
<%def name="title()">Login</%def>
|
||||||
|
|
||||||
<%def name="head_tags()">
|
<%def name="extra_javascript()">
|
||||||
${parent.head_tags()}
|
${parent.extra_javascript()}
|
||||||
${h.javascript_link(request.static_url('tailbone:static/js/login.js'))}
|
${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'))}
|
${h.stylesheet_link(request.static_url('tailbone:static/css/login.css'))}
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue