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

--- Comment #5 from Paul Derscheid <[email protected]> ---
Created attachment 194372
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194372&action=edit
Bug 15792: Throttle patron renewal links to prevent double-clicks

- Replace plain <a> renewal links in patron_messages.inc with the
  reusable throttled-button component introduced in Bug 40896
- Covers all four renewal links: warndeparture and expired states,
  in both circulation and patron detail contexts
- Include throttledButton.js in circulation.tt and moremember.tt
- Add persist mode and done icon state to throttled-button component
  so the button stays disabled on bfcache restore with a check icon
  instead of a misleading spinner

Test plan:
1) Create or update a patron category with an enrollment fee and an
   enrollment period in months (e.g. 24 months)
2) Create a patron of that type and write off any initial enrollment
   fee
3) Set the patron's dateexpiry to the past so the account is expired
4) Go to /cgi-bin/koha/circ/circulation.pl and scan the patron
5) Observe the "Renew" link in the expiration warning now shows as a
   small button with a rotate icon
6) Click "Renew" and confirm the button becomes disabled with a
   spinner, preventing a second click
7) Verify the patron is renewed correctly with only one enrollment
   fee charged and the correct expiry date
8) Press the browser back button to return via bfcache
9) Verify the button remains disabled and shows a check icon instead
   of the spinner, indicating the action was already completed
10) Repeat from the patron detail page (moremember.pl) to verify the
    same throttle and done-state behavior there
11) Test the warndeparture case by setting dateexpiry to a near-future
    date and confirming the same behavior

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to