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:
parent
a58a0d9fa8
commit
4cc6b4c9c0
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue