Bug 34478: Changes for patron_lists/add-modify
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
ee17b3d417
commit
1a887538b9
2 changed files with 3 additions and 1 deletions
|
@ -80,6 +80,7 @@
|
|||
</fieldset>
|
||||
|
||||
<fieldset class="action">
|
||||
<input type="hidden" name="op" value="cud-add_modify" />
|
||||
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id | html %]" />
|
||||
<input type="submit" class="btn btn-primary" value="Save" />
|
||||
<a href="lists.pl" class="cancel">Cancel</a>
|
||||
|
|
|
@ -26,6 +26,7 @@ use C4::Output qw( output_html_with_http_headers );
|
|||
use Koha::List::Patron qw( AddPatronList GetPatronLists ModPatronList );
|
||||
|
||||
my $cgi = CGI->new;
|
||||
my $op = $cgi->param('op') // q{};
|
||||
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
|
@ -45,7 +46,7 @@ if ($id) {
|
|||
$template->param( list => $list );
|
||||
}
|
||||
|
||||
if ($name) {
|
||||
if ( $op eq 'cud-add_modify' && $name ) {
|
||||
if ($id) {
|
||||
ModPatronList( { patron_list_id => $id, name => $name, shared => $shared } );
|
||||
print $cgi->redirect('lists.pl');
|
||||
|
|
Loading…
Reference in a new issue