Bugzilla – Attachment 168032 Details for
Bug 37161
After deleting a tag in a MARC framework, confirmation page is blank
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37161: After deleting a tag in a MARC framework, redirect back to the tag list rather than showing a 'Tag deleted' page first
Bug-37161-After-deleting-a-tag-in-a-MARC-framework.patch (text/plain), 4.73 KB, created by
Sam Lau
on 2024-06-24 16:51:53 UTC
(
hide
)
Description:
Bug 37161: After deleting a tag in a MARC framework, redirect back to the tag list rather than showing a 'Tag deleted' page first
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2024-06-24 16:51:53 UTC
Size:
4.73 KB
patch
obsolete
>From 091e65224a4946add23b52d427e8534daa15c840 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Sat, 22 Jun 2024 15:35:31 -0700 >Subject: [PATCH] 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> >--- > admin/marctagstructure.pl | 4 ++- > .../prog/en/modules/admin/marctagstructure.tt | 25 ------------------- > 2 files changed, 3 insertions(+), 26 deletions(-) > >diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl >index 1d48076f0f..5c08c87af0 100755 >--- a/admin/marctagstructure.pl >+++ b/admin/marctagstructure.pl >@@ -180,7 +180,9 @@ if ($op eq 'add_form') { > $cache->clear_from_cache("MarcStructure-1-$frameworkcode"); > $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode"); > $cache->clear_from_cache("MarcCodedFields-$frameworkcode"); >- $template->param( searchfield => $searchfield ); >+ print $input->redirect( >+ "/cgi-bin/koha/admin/marctagstructure.pl?searchfield=$searchfield&frameworkcode=$frameworkcode"); >+ exit; > # END $OP eq DELETE_CONFIRMED > ################## ITEMTYPE_CREATE ################################## > # called automatically if an unexisting frameworkis selected >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >index d3c54b1787..f0e028ff2c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >@@ -15,9 +15,6 @@ > [% IF ( delete_confirm ) %] > [% tx("Confirm deletion of tag {searchfield}", { searchfield = searchfield }) | html %] › > [% END %] >- [% IF ( delete_confirmed ) %] >- [% t("Data deleted") | html %] › >- [% END %] > [% IF framework %] > [% framework.frameworktext | html %] ([% framework.frameworkcode | html %]) › > [% ELSE %] >@@ -84,20 +81,6 @@ > [% WRAPPER breadcrumb_item bc_active= 1%] > [% tx("Confirm deletion of tag {searchfield}", { searchfield = searchfield }) | html %] > [% END %] >- >- [% ELSIF ( delete_confirmed ) %] >- [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]"> >- [% IF framework %] >- <span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span> >- [% ELSE %] >- <span>Default framework</span> >- [% END %] >- </a> >- [% END %] >- [% WRAPPER breadcrumb_item bc_active= 1%] >- <span>Data deleted</span> >- [% END %] > [% END %] > [% END #/ WRAPPER breadcrumbs %] > [% END #/ WRAPPER sub-header.inc %] >@@ -212,14 +195,6 @@ > </div> > [% END %] > >-[% IF ( delete_confirmed ) %] >- >- <div class="dialog message"><h3>Tag deleted</h3> >- <form action="[% script_name | html %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" /> >- [% INCLUDE 'csrf-token.inc' %] >- <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button> >- </form></div> >-[% END %] > [% IF ( framework_create ) %] > > <form action="[% script_name | html %]" method="post"> >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37161
:
168004
|
168007
|
168032
|
168033
|
168108