2013-09-01 20:25:34 -07:00
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
2017-02-13 19:08:18 -06:00
|
|
|
$('#username').keydown(function(event) {
|
|
|
|
if (event.which == 13) {
|
|
|
|
$('#password').focus().select();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
});
|
|
|
|
|
2013-09-01 20:25:34 -07:00
|
|
|
$('form').submit(function() {
|
|
|
|
if (! $('#username').val()) {
|
|
|
|
with ($('#username').get(0)) {
|
|
|
|
select();
|
|
|
|
focus();
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if (! $('#password').val()) {
|
|
|
|
with ($('#password').get(0)) {
|
|
|
|
select();
|
|
|
|
focus();
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#username').focus();
|
|
|
|
|
|
|
|
});
|