Skip to content

Make login button spinner more robust by using Bootstrap's data-bs-submit attribute#681

Open
MatrixNeoKozak wants to merge 1 commit into
retspen:masterfrom
MatrixNeoKozak:scout-improvement-1780225958592
Open

Make login button spinner more robust by using Bootstrap's data-bs-submit attribute#681
MatrixNeoKozak wants to merge 1 commit into
retspen:masterfrom
MatrixNeoKozak:scout-improvement-1780225958592

Conversation

@MatrixNeoKozak
Copy link
Copy Markdown

The login.html and otp_login.html templates manually disable the submit button, add a spinner, and submit the form. This is fragile and duplicates code. Instead, use Bootstrap's data-bs-submit attribute (or a common pattern with disabled and inline spinner) to ensure consistent UX and reduce JavaScript duplication. However, since data-bs-submit is not standard, we propose a cleaner approach: remove the manual click handler that disables the button and submits, and instead rely on the form's native submit event. Add a single event listener on the form to disable the button and show spinner on submit, preventing double-clicks. This simplifies the templates and improves accessibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant