mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-04 06:51:48 +01:00
Add form submission debugging to login page
This commit is contained in:
parent
90234ee58b
commit
29fd18839f
517 changed files with 154163 additions and 1 deletions
|
|
@ -71,7 +71,7 @@
|
|||
</div>
|
||||
{{end}}
|
||||
|
||||
<form method="POST" action="/login">
|
||||
<form method="POST" action="/login" id="loginForm">
|
||||
<div class="form-group">
|
||||
<label for="login">Username</label>
|
||||
<input type="text" id="login" name="login" required autofocus>
|
||||
|
|
@ -84,6 +84,20 @@
|
|||
|
||||
<button type="submit" class="btn" style="width: 100%;">Login</button>
|
||||
</form>
|
||||
|
||||
<div id="debug" style="margin-top: 1rem; font-size: 0.8rem; color: var(--text-secondary);"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('loginForm').addEventListener('submit', function(e) {
|
||||
const username = document.getElementById('login').value;
|
||||
const password = document.getElementById('password').value;
|
||||
const debug = document.getElementById('debug');
|
||||
|
||||
debug.innerHTML = 'Submitting: username="' + username + '" (length: ' + username.length + '), password length: ' + password.length;
|
||||
|
||||
console.log('Form submit - Username:', username, 'Password length:', password.length);
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue