From 7dc1b9e95436452d2008bce17aa88df6496064a6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 20 Feb 2024 19:38:34 +0000 Subject: [PATCH] Bug 34478: Update numbering patterns modification and deletion The numbering patterns script has been update to look for "cud-modify" to load the edit form, but that's a GET operation and can stay "modify." The delete buttons have been updated to be a POSTed form. Signed-off-by: Jonathan Druart --- .../prog/en/modules/serials/subscription-numberpatterns.tt | 7 ++++++- serials/subscription-numberpatterns.pl | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt index 5e728ac51b..a358f68f7e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt @@ -301,7 +301,12 @@ [% numberpattern.displayorder | html %] Edit - Delete +
+ [% INCLUDE 'csrf-token.inc' %] + + + +
[% END %] diff --git a/serials/subscription-numberpatterns.pl b/serials/subscription-numberpatterns.pl index 1c38537b32..4b931edae8 100755 --- a/serials/subscription-numberpatterns.pl +++ b/serials/subscription-numberpatterns.pl @@ -102,8 +102,8 @@ if($op && $op eq 'cud-savenew') { } } -if($op && ($op eq 'new' || $op eq 'cud-modify')) { - if($op eq 'cud-modify') { +if($op && ($op eq 'new' || $op eq 'modify')) { + if($op eq 'modify') { my $id = $input->param('id'); if(defined $id) { my $numberpattern = GetSubscriptionNumberpattern($id); -- 2.39.5