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