[Bug 43305] New: Migrate transfer_limits.tt to use api-client.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43305 Bug ID: 43305 Summary: Migrate transfer_limits.tt to use api-client.js Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 34451 Target Milestone: --- admin/transfer_limits.tt uses raw jQuery.ajax() for POST and DELETE calls to /api/v1/transfer_limits. These need to be migrated to api-client.js for proper CSRF token handling (bug 34451). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43305 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34451 Depends on|34451 | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43305 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43305 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 203675 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203675&action=edit Bug 43305: Migrate transfer_limits.tt to use api-client.js This patch replaces raw jQuery.ajax() calls with the api-client.js pattern in admin/transfer_limits.tt for CSRF token handling. Changes: - Add TransferLimitAPIClient with create, delete, batch_create, and batch_delete methods - Register it in api-client.js as APIClient.transfer_limit - Replace all POST/DELETE $.ajax calls in transfer_limits.tt with api-client calls The remaining $.ajax call (GET for loading limits) does not need migration as GET requests are exempt from CSRF validation. Test plan: 1. Apply patch 2. Go to Administration > Library transfer limits 3. Select a limit type from the dropdown 4. Toggle individual checkboxes (add/remove single limits) => SUCCESS: Limits created and deleted correctly 5. Use "Check all" / "Uncheck all" buttons (batch operations) => SUCCESS: Batch create/delete works correctly 6. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org