Skip to content

Commit

Permalink
Bug 34478: Manual fix - add op clubs/templates-add-modify
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Druart <[email protected]>
  • Loading branch information
ricofreak authored and joubu committed Mar 1, 2024
1 parent a58a0d9 commit 4cc6b4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion clubs/templates-add-modify.pl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

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',
Expand All @@ -48,7 +49,7 @@
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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 4cc6b4c

Please sign in to comment.