Bug 37161: After deleting a tag in a MARC framework, redirect back to the tag list...
authorPhil Ringnalda <phil@chetcolibrary.org>
Sat, 22 Jun 2024 22:35:31 +0000 (15:35 -0700)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 27 Jun 2024 09:50:01 +0000 (11:50 +0200)
commit825c6c5edf953161acf124a4fcecd6d32f719431
tree660dfb3f9d7e36e1608f8093086dbf16833a8ecb
parent3d1b38b0ade54dae8d565e2195e2e97f4826a0b6
Bug 37161: After deleting a tag in a MARC framework, redirect back to the tag list rather than showing a 'Tag deleted' page first

Currently after you delete a tag from a MARC framework, Koha intends to show
you a page with the text "Tag deleted" and an OK button to click to go back to
where you were in the list of tags. But because that depends on the template
variable being set for the name of the op in the script, and the name of the
op is "cud-delete_confirmed" which isn't a legal TT variable name, nothing is
set to tell the template what to display, so it displays a mostly-blank page.

Far better to show, don't tell, and just redirect to the list of tags like
deleting a tag from an authority framework does.

Test plan:
1. Without the patch, Administration - MARC bibliographic frameworks -
   Binders row - Actions menu - MARC structure
2. Type 092 and press Enter in the Search for tag: input
3. 092 row - Actions menu - Delete - Yes, delete this tag
4. Stare blankly at the blank page with only a header
5. Apply patch, restart_all
6. Administration - MARC bibliographic frameworks - Kits row - Actions menu -
   MARC structure
7. Type 092 and press Enter in the Search for tag: input
8. 092 row - Actions menu - Delete - Yes, delete this tag
9. Enjoy the sight of the Kits framework showing a search for 092 that
   doesn't show one, because you just deleted it, and now you can delete
   the 096 tag next

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
admin/marctagstructure.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt