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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Lucas Gass 2024-02-05 23:00:23 +00:00 committed by Jonathan Druart
parent 4f54b9ccd6
commit a58a0d9fa8
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
2 changed files with 3 additions and 1 deletions

View file

@ -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,

View file

@ -49,6 +49,7 @@
<form method="post" class="validated">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="op" value="cud-update" />
<input type="hidden" name="id" value="[% club.id | html %]" />
<input type="hidden" name="club_template_id" value="[% club_template.id | html %]" />