mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 18:28:18 +03:00
WebUI: Minor optimizations to the login page
This commit is contained in:
parent
3007762864
commit
43300d97e2
2 changed files with 5 additions and 8 deletions
|
@ -23,14 +23,14 @@
|
|||
<img src="images/qbittorrent-tray.svg" alt="qBittorrent logo" />
|
||||
</div>
|
||||
<div id="formplace" class="col">
|
||||
<form id="loginform" method="post" onsubmit="submitLoginForm();">
|
||||
<form id="loginform" method="post" onsubmit="submitLoginForm(event);">
|
||||
<div class="row">
|
||||
<label for="username">QBT_TR(Username)QBT_TR[CONTEXT=HttpServer]</label><br />
|
||||
<input type="text" id="username" name="username" autocomplete="username" />
|
||||
<input type="text" id="username" name="username" autocomplete="username" required />
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="password">QBT_TR(Password)QBT_TR[CONTEXT=HttpServer]</label><br />
|
||||
<input type="password" id="password" name="password" autocomplete="current-password" />
|
||||
<input type="password" id="password" name="password" autocomplete="current-password" required />
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="submit" id="login" value="QBT_TR(Login)QBT_TR[CONTEXT=HttpServer]" />
|
||||
|
|
|
@ -31,13 +31,10 @@
|
|||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.getElementById('username').focus();
|
||||
document.getElementById('username').select();
|
||||
|
||||
document.getElementById('loginform').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
function submitLoginForm() {
|
||||
function submitLoginForm(event) {
|
||||
event.preventDefault();
|
||||
const errorMsgElement = document.getElementById('error_msg');
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
|
|
Loading…
Reference in a new issue