Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unique username field id #123

Open
wants to merge 1 commit into
base: fix-login-from-MyAccount/EmailResetPin
Choose a base branch
from

Conversation

Chloe070196
Copy link

A user might attempt to sign in while viewing the PIN email reset page (MyAccount/EmailResetPin). Without this patch, any attempt at submitting login info through the login form popup while on said page will fail.

This is because there is both a username field in the PIN email reset form and in the login form, and both share the same id. Since the log in form is referred to as the 'ajax-login' template, this patch changes the id of its username field to 'ajaxLoginUsername', so that it is unique in this scenario.

To replicate:

  • go to /MyAccount/EmailResetPin
  • select 'Sign In'
  • fill in the form with valid credentials
  • notice the 'Please enter both Library Barcode and PIN / Password.' error message.

Test plan:

  • apply this patch
  • repeat the steps above
  • notice that, instead of an error, you are logged in as normal.

A user might attempt to sign in while viewing the PIN email reset page
(MyAccount/EmailResetPin). Without this patch, any attempt at submitting
login info through the login form popup while on said page will fail.

This is because there is both a username field in the PIN email reset
form and in the login form, and both share the same id. Since the log
in form is referred to as the 'ajax-login' template, this patch
changes the id of its username field to 'ajaxLoginUsername', so that
it is unique in this scenario.

To replicate:
- go to /MyAccount/EmailResetPin
- select 'Sign In'
- fill in the form with valid credentials
- notice the 'Please enter both Library Barcode and PIN / Password.'
  error message.

Test plan:

- apply this patch
- repeat the steps above
- notice that, instead of an error, you are logged in as normal.
@Chloe070196 Chloe070196 changed the title feat: unique username field id fix: unique username field id Sep 13, 2024
@Chloe070196
Copy link
Author

rebase needed

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