mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 01:15:47 +01:00
auto-focusing input on login screen
This commit is contained in:
@@ -12,16 +12,15 @@
|
||||
if (target) {
|
||||
document.location.href = target.getAttribute('data-url');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('#login').on('click', function() {
|
||||
|
||||
var loginData = {
|
||||
'username': $('#username').val(),
|
||||
'password': $('#password').val(),
|
||||
'_csrf': $('#csrf-token').val()
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: RELATIVE_PATH + '/login',
|
||||
@@ -44,5 +43,6 @@
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
document.querySelector('#content input').focus();
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user