From 4c42ed7ff883c3dc98f217f6377cacad14883c35 Mon Sep 17 00:00:00 2001 From: Raguram Gopinath Date: Wed, 21 Jan 2026 02:37:29 +0000 Subject: [PATCH] Bug 40031: Redirect to add action page from add template form Test plan: 1. Login to staff client. 2. Go to: Cataloging > MARC modification templates > New template 3. Give new template a name and click submit. 4. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl If you are using KTD 5. Apply patch and restart services. 6. Repeat steps 2 and 3. 7. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=(template_id)&op=select_template 8. You can now add actions for your new template. --- tools/marc_modification_templates.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/marc_modification_templates.pl b/tools/marc_modification_templates.pl index c130cc3..66c4f52 100755 --- a/tools/marc_modification_templates.pl +++ b/tools/marc_modification_templates.pl @@ -50,7 +50,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( if ( $op eq "cud-create_template" ) { $template_id = '' unless $cgi->param('duplicate_current_template'); $template_id = AddModificationTemplate( scalar $cgi->param('template_name'), $template_id ); - + print $cgi->redirect( + "/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=$template_id&op=select_template"); } elsif ( $op eq "cud-delete_template" ) { DelModificationTemplate($template_id); -- 2.39.5