Bug 41807: Fix automatic tab selection on basket groups page

This patch fixes the JS in the basket groups template which is intended
to select the "Closed" tab when a "listclosed" parameter is passed.

To test, apply the patch and go to Acquisitions.

- Search for and view a vendor.
- Click "Basket groups" in the sidebar.
- Create a new basket group if necessary.
- Click "Delete" to remove the basket group.
- When the page reloads the "Closed" tab should be selected.
- Create a new basket group if necessary and click "Close and export as
  PDF." When the page reloads the "Closed" tab should be selected.
- Click "Reopen." The "Closed" tab should again be selected.

The patch doesn't make any changes to existing behavior but I think we
should re-evaluate whether the "Closed" tab is the right place to go
after deleting or reopening a basket group.

Sponsored-by: Athens County Public Libraries

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 199cdbd34a)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This commit is contained in:
Owen Leonard 2026-02-10 08:20:07 -05:00 committed by Jacob O'Mara
parent d2a7c21e28
commit 36cbadb792
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -420,9 +420,9 @@
$(document).ready(function() {
[% IF ( listclosed) %]
$("#basket_groups a[href='#closed']").tab("show");
$("#basket_groups a[href='#closed_panel']").tab("show");
[% ELSE %]
$("#basket_groups a[href='#opened']").tab("show");
$("#basket_groups a[href='#opened_panel']").tab("show");
[% END %]
[% UNLESS ( grouping ) %]
let dt_params = {