diff --git a/admin/oai_sets.pl b/admin/oai_sets.pl index fe611953a0..6e69eac652 100755 --- a/admin/oai_sets.pl +++ b/admin/oai_sets.pl @@ -55,7 +55,7 @@ if($op && $op eq "new") { name => $name, descriptions => \@descriptions }); -} elsif($op && $op eq "cud-mod") { +} elsif($op && $op eq "mod") { my $id = $input->param('id'); my $set = GetOAISet($id); $template->param( diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt index f258097c41..3ccf6d187f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt @@ -139,7 +139,7 @@ Actions @@ -148,6 +148,11 @@ [% END %] +
+ [% INCLUDE 'csrf-token.inc' %] + + +
[% ELSE %]

There are no sets defined.

@@ -181,13 +186,14 @@ $(li).remove(); } - function confirmDelete() { - return confirm(_("Are you sure you want to delete this OAI set?")); - } - $(document).ready(function() { - $(".delete_oai_set").on("click",function(){ - return confirmDelete(); + $(".delete_oai_set").on("click",function(e){ + e.preventDefault(); + if( confirm(_("Are you sure you want to delete this OAI set?")) ){ + let oai_set_id = $(this).data("oai-set-id"); + $("#oai_sets_id").val( oai_set_id ); + $("#oai_sets_delete").submit(); + } }); $("body").on("click", ".remove_description", function(e){