Skip to content

Commit

Permalink
Prevent double clicking of the submit button on login (#3554)
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Corliss <[email protected]>
  • Loading branch information
pcorliss authored Jun 13, 2024
1 parent 23efe92 commit a174846
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ body {
outline: none;
}

.dex-btn:disabled {
cursor: not-allowed;
opacity: 0.5;
}

.dex-btn-icon {
background-position: center;
background-repeat: no-repeat;
Expand Down
8 changes: 8 additions & 0 deletions web/templates/password.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,12 @@ <h2 class="theme-heading">Log in to Your Account</h2>
{{ end }}
</div>


<script type="text/javascript">
document.querySelector('form').onsubmit = function(e) {
var el = document.querySelector('#submit-login');
el.setAttribute('disabled', 'disabled');
};
</script>

{{ template "footer.html" . }}

0 comments on commit a174846

Please sign in to comment.