Bug 38536: Patrons requesting modifications: Expand correct panel

This patch updates the JavaScript on the patrons requesting modification
page in order to make it work following the upgrade to Bootstrap 5. The
automatic panel expansion is broken.

To test, apply the patch and enable, if necessary, the OPACPatronDetails
system preference.

- Log in to the OPAC and submit changes to your personal details.
- Do this again as a different user so that there is more than one
  pending request.
- From the staff interface home page, follow the link for "Patrons
  requesting modifications"
- Upon loading, the "Update patron records" page should automatically
  expand the first panel.
- Locate the patron record for the second of the patrons you requested
  updates for.
- From that patron's detail page, follow the "Review pending
  modifications" link.
- The panel containing that patron's information should expand by
  default.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a42686d891)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
Owen Leonard 2024-11-26 15:57:12 +00:00 committed by wainuiwitikapark
parent 63bb6bfd67
commit 48da1efed3
1 changed files with 2 additions and 2 deletions

View File

@ -222,9 +222,9 @@
<script>
$(document).ready(function(){
[%- IF ( active ) -%]
$("#pending_updates_group a[href='#panel-" + [% active | html %] + "_panel']").click();
$("#panel-" + [% active | html %] + "_panel").collapse("show");
[%- ELSE -%]
$("#pending_updates_group a.collapsed:eq(0)").click();
$(".panel-collapse:eq(0)").collapse("show");
[%- END -%]
});
</script>