https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38728
Andrew Fuerste-Henry <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #188871|0 |1 is obsolete| | --- Comment #23 from Andrew Fuerste-Henry <[email protected]> --- Created attachment 190651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190651&action=edit Bug 38728: (follow-up) Fix cashup modal triggering after POST/REDIRECT/GET implementation The upstream implementation of POST/REDIRECT/GET pattern for cashup operations introduced a regression where the cashup modal would no longer auto-trigger after successful cashup submission. The original approach passed cashup_id as a query parameter in the redirect, but the template variable was not being populated from the URL parameter, causing the JavaScript to receive an empty value. This follow-up implements a more modern and reliable solution using URL hash fragments instead of query parameters: 1. Changed redirect URLs to use hash fragments (e.g., #cashup-123) 2. Updated JavaScript to detect and parse hash fragments on page load 3. Auto-triggers the cashup modal when hash is present 4. Cleans up the URL using history.replaceState() after modal opens Benefits: - Maintains proper POST/REDIRECT/GET pattern - Hash fragments don't trigger server requests or require server-side handling - More reliable than template variable approach - Follows modern web development patterns - Works consistently across both register.pl and registers.pl pages Test plan: 1. Navigate to POS register page (pos/register.pl) 2. Perform a cashup operation 3. Verify the cashup summary modal automatically appears after redirect 4. Verify the URL is clean (no hash fragment visible) 5. Repeat for registers summary page (pos/registers.pl) 6. Perform individual register cashup 7. Verify modal auto-triggers correctly Signed-off-by: Andrew Fuerste Henry <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ 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/
