Bug 34478: Convert patron file delete link to a posted form
This patch modifies the patron file template to convert the "Delete" link to a form which includes the CSRF token. The script has already been modified to check for the "op" value updated in the template. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
7947f7872b
commit
78bcbf52f7
|
|
@ -70,7 +70,17 @@
|
|||
<td>[% f.file_type | html %]</td>
|
||||
<td>[% f.file_description | html %]</td>
|
||||
<td>[% f.date_uploaded | $KohaDates %]</td>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]<td><a class="btn btn-default btn-xs confirmdelete" href="?borrowernumber=[% patron.borrowernumber | html %]&op=delete&file_id=[% f.file_id | html %]"><i class="fa fa-trash-can"></i> Delete</a></td>[% END %]
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<td>
|
||||
<form action="files.pl" method="post">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-delete" />
|
||||
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
|
||||
<input type="hidden" name="file_id" value="[% f.file_id | html %]" />
|
||||
<button class="btn btn-default btn-xs confirmdelete"><i class="fa fa-trash-can"></i> Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
[% END %]
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Reference in New Issue