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)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Tue, 16 Jan 2024 11:06:16 +0000 (12:06 +0100)
commit21e2ee11fba6230b77e8b6376b0a903951170646
tree2decb1b096d83c25ff301d507e289168dae020cc
parent2de99d0b028fea2b78fed3a8cd9e44c207e92603
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>
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]