From 4cc6b4c9c0110510273f091bc50ffb60286f8188 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 5 Feb 2024 23:09:35 +0000 Subject: [PATCH] Bug 34478: Manual fix - add op clubs/templates-add-modify Signed-off-by: Jonathan Druart --- clubs/templates-add-modify.pl | 3 ++- .../prog/en/modules/clubs/templates-add-modify.tt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/clubs/templates-add-modify.pl b/clubs/templates-add-modify.pl index f32a6d107d..6526a3c6ff 100755 --- a/clubs/templates-add-modify.pl +++ b/clubs/templates-add-modify.pl @@ -34,6 +34,7 @@ my $schema = Koha::Database->new()->schema(); my $cgi = CGI->new; +my $op = $cgi->param('op') || q{}; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => 'clubs/templates-add-modify.tt', @@ -48,7 +49,7 @@ my $id = $cgi->param('id'); my $club_template; my $stored; -if ( $cgi->param('name') ) { # Update or create club +if ( $cgi->param('name') && $op eq 'cud-update' ) { # Update or create club if ($id) { $club_template = Koha::Club::Templates->find($id); $stored = 'updated'; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt index 3369753ef7..e9f1d11660 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt @@ -55,7 +55,7 @@
[% INCLUDE 'csrf-token.inc' %] - +

[% IF club_template %] Modify club template [% club_template.name | html | $HtmlTags tag="em" %] -- 2.39.5