Bug 34478: Update numbering patterns modification and deletion
The numbering patterns script has been update to look for "cud-modify" to load the edit form, but that's a GET operation and can stay "modify." The delete buttons have been updated to be a POSTed form. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
87d12dbe3c
commit
7dc1b9e954
|
|
@ -301,7 +301,12 @@
|
|||
<td>[% numberpattern.displayorder | html %]</td>
|
||||
<td class="actions">
|
||||
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/serials/subscription-numberpatterns.pl?op=modify&id=[% numberpattern.id | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
<a class="delete_pattern btn btn-default btn-xs" href="/cgi-bin/koha/serials/subscription-numberpatterns.pl?op=del&id=[% numberpattern.id | html %]"><i class="fa fa-trash-can"></i> Delete</a>
|
||||
<form action="/cgi-bin/koha/serials/subscription-numberpatterns.pl" method="post">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-del" />
|
||||
<input type="hidden" name="id" value="[% numberpattern.id | html %]" />
|
||||
<button class="delete_pattern btn btn-default btn-xs"><i class="fa fa-trash-can"></i> Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ if($op && $op eq 'cud-savenew') {
|
|||
}
|
||||
}
|
||||
|
||||
if($op && ($op eq 'new' || $op eq 'cud-modify')) {
|
||||
if($op eq 'cud-modify') {
|
||||
if($op && ($op eq 'new' || $op eq 'modify')) {
|
||||
if($op eq 'modify') {
|
||||
my $id = $input->param('id');
|
||||
if(defined $id) {
|
||||
my $numberpattern = GetSubscriptionNumberpattern($id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue