Bug 34479: Move patron selection history to a re-useable file
authorMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Mon, 27 Nov 2023 10:35:15 +0000 (10:35 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 2 Feb 2024 18:18:22 +0000 (18:18 +0000)
commitb507f9410892c7d35f31da1ddffa9f424a314802
tree072b7bb574eba24e5f5859dc90c49bb2ac2cb9b9
parentd28e035f4d0539956c82d82c956081b4e4a94879
Bug 34479: Move patron selection history to a re-useable file

This patch takes some of the functionality for maintaining patron selections and moves it to a new file that can be used in other template files. It also introduces a new method for determining whether to delete the history after an operation is complete, along with an .inc file containing the checkbox that manages this

Test plan:
1) Navigate to Patrons and run a search
2) Use the checkboxes to select some patrons and run the three different options in the menu bar: Add to patron list, Merge selected patrons, Batch patron modification.
3) For each operation, you should see a checkbox asking if you want to "Keep patrons selected for anew operation". N.B. For adding patrons to a list, you will only see this when selecting to add them to a new list
4) When you run the operations, if you select the checkbox to keep the patrons then when you return tho the patron search, those patrons should all be still selected.
5) If you don't check the box, when you return to the search, your patron selection history should be empty and no patrons should be selected
N.B. If you have run a merge operation and elected to keep the patron history, you will only keep the patron who was kept

Signed-off-by: Sharon Dugdale <sharon.dugdale@cumberland.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Michael Adamyk <madamyk@ckls.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 21e2ee11fba6230b77e8b6376b0a903951170646)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8ea3e73edc558db15befa4bc50350b65036e3c4a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/members-patron-selections.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/js/members-patron-selections.js [new file with mode: 0644]