https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43310

--- Comment #12 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 208461
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208461&action=edit
Bug 43310: (QA follow-up) Tidy two_factor_auth.tt api-client usage

- Show "Invalid PIN code" on a wrong PIN now that the error message is no
  longer prefixed, and suppress the generic http-client dialog so the
  error is only displayed once.
- Show err.message in the alerts instead of the stringified Error.
- Drop the empty `{}` body from the registration request and the unused
  `data` argument from the success handler.
- Use .text() rather than .html() for values returned by the API.

Test plan:
1. Enable the TwoFactorAuthentication system preference
2. Go to a patron account > More > Two-factor authentication
3. Click "Enable two-factor authentication"
=> SUCCESS: QR code and secret are displayed
4. Enter a wrong PIN code and click Register
=> SUCCESS: "Invalid PIN code" is shown once, with no alert() dialog
5. Enter a valid PIN code and click Register
=> SUCCESS: 2FA is enabled and the page reloads

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to