Skip to content

Commit

Permalink
Fix stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
shiloholotu committed Apr 11, 2024
1 parent e293daa commit 58395e3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
2 changes: 2 additions & 0 deletions static/scripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ function submitApplication(){
if(filled){
filled = false;
unfilledElement = $(this).attr("id");
console.log(unfilledElement);
}
}
})
if (!filled){
alert("Please fill all fields!");
// scroll to first unfilled required field
console.log(unfilledElement)
window.scrollTo(0, document.getElementById(unfilledElement).offsetTop - 200);
return;
}
Expand Down
19 changes: 0 additions & 19 deletions templates/login.html
Original file line number Diff line number Diff line change
@@ -1,19 +0,0 @@


<!-- login.html -->
<div id="loginForm" class="overlay" style="display: none;">
<div class="container">
<form>{#<form method="POST" action="{{ url_for('auth.login') }}">#}
<label for="username">Username *</label>
<input type="text" id="username" name="username" required>

<label for="password">Password *</label>
<input type="password" id="password" name="password" required>

<input id="loginButton" id="" type="submit" value="Login">
<button id="closeModal" type="button" onclick="hideLoginForm()">Click anywhere to close</button>
</form>
</div>
</div>

<script src="/static/scripts/login.js"></script>
2 changes: 0 additions & 2 deletions templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@
<a class="nav-link" href="/sources">Sources</a>
<!--<button class="nav-link" onclick="showLoginForm()">Login</button>-->
</div>

{% include 'login.html' %}

0 comments on commit 58395e3

Please sign in to comment.