From a58a0d9fa8cb7c489c8cb2eee231c786ad264710 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 5 Feb 2024 23:00:23 +0000 Subject: [PATCH] Bug 34478: Manual fix - add op clubs/clubs-add-modify Signed-off-by: Jonathan Druart --- clubs/clubs-add-modify.pl | 3 ++- .../intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clubs/clubs-add-modify.pl b/clubs/clubs-add-modify.pl index 3c5854376e..e8ea64fad7 100755 --- a/clubs/clubs-add-modify.pl +++ b/clubs/clubs-add-modify.pl @@ -30,6 +30,7 @@ use Koha::Club::Fields; my $cgi = CGI->new; +my $op = $cgi->param('op') || q{}; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => 'clubs/clubs-add-modify.tt', @@ -58,7 +59,7 @@ $club_template_id ||= $club_template->id(); my $date_start = $cgi->param('date_start') || undef; my $date_end = $cgi->param('date_end') || undef; -if ( $cgi->param('name') ) { # Update or create club +if ( $cgi->param('name') && $op eq 'cud-update' ) { # Update or create club $club->set( { club_template_id => scalar $cgi->param('club_template_id') || undef, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt index f8e37273af..9803288fc6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt @@ -49,6 +49,7 @@
[% INCLUDE 'csrf-token.inc' %] + -- 2.39.5