mod
This commit is contained in:
parent
b6fac28396
commit
f329c944f8
1 changed files with 2 additions and 11 deletions
|
|
@ -11,8 +11,8 @@
|
||||||
<p>Enter your Sleeper username to view your fantasy teams</p>
|
<p>Enter your Sleeper username to view your fantasy teams</p>
|
||||||
|
|
||||||
<!-- Username input form -->
|
<!-- Username input form -->
|
||||||
<form class="username-form" onsubmit="goToUser(event)">
|
<form class="username-form" method="get" action="/dashboard">
|
||||||
<input type="text" id="username" placeholder="Enter Sleeper username" required>
|
<input type="text" name="username" placeholder="Enter Sleeper username" required>
|
||||||
<button type="submit">View Dashboard</button>
|
<button type="submit">View Dashboard</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
@ -21,13 +21,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
|
||||||
function goToUser(event) {
|
|
||||||
event.preventDefault(); // Prevent form submission
|
|
||||||
const username = document.getElementById('username').value.trim();
|
|
||||||
if (username) {
|
|
||||||
window.location.href = `/${username}`; // Navigate to user dashboard
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue