Bug 34478: Manual fix - add op clubs/templates-add-modify

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Lucas Gass 2024-02-05 23:09:35 +00:00 committed by Jonathan Druart
parent a58a0d9fa8
commit 4cc6b4c9c0
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
2 changed files with 3 additions and 2 deletions

View File

@ -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';

View File

@ -55,7 +55,7 @@
<form method="post" class="validated">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="id" value="[% club_template.id | html %]" />
<input type="hidden" name="op" value="cud-update" />
<h1>
[% IF club_template %]
<span>Modify club template [% club_template.name | html | $HtmlTags tag="em" %]</span>