Bug 34478: Convert authorised value delete link to POST form
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
09bfb81c5e
commit
325b3e7c10
1 changed files with 11 additions and 3 deletions
|
@ -297,8 +297,16 @@
|
|||
<span>No limitation</span>
|
||||
[% END # /IF loo.branches.size > 0 %]
|
||||
</td>
|
||||
<td class="actions"><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&id=[% loo.id | uri %]" class="btn btn-default btn-xs"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
<a class="delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/authorised_values.pl?op=delete&searchfield=[% searchfield | uri %]&id=[% loo.id | uri %]"><i class="fa fa-trash-can"></i> Delete</a></td>
|
||||
<td class="actions">
|
||||
<a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&id=[% loo.id | uri %]" class="btn btn-default btn-xs"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
<form action="/cgi-bin/koha/admin/authorised_values.pl" method="post">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-delete" />
|
||||
<input type="hidden" name="searchfield" value="[% searchfield | html %]" />
|
||||
<input type="hidden" name="id" value="[% loo.id | html %]" />
|
||||
<button type="submit" class="delete btn btn-default btn-xs"><i class="fa fa-trash-can"></i> Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
[% END # /FOREACH loop %]
|
||||
</tbody>
|
||||
|
@ -376,7 +384,7 @@
|
|||
$("#branches option:first").attr("selected", "selected");
|
||||
}
|
||||
|
||||
$("a.delete").click(function(){
|
||||
$(".delete").click(function(){
|
||||
return confirm(_("Are you sure you want to delete this authorized value?"));
|
||||
});
|
||||
$('#category_search').change(function() {
|
||||
|
|
Loading…
Reference in a new issue