Bug 34478: (follow-up) Change invoice files delete link to POST
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
ea6842ea21
commit
8c35fec856
1 changed files with 13 additions and 3 deletions
|
@ -75,8 +75,18 @@
|
|||
[% f.date_uploaded | $KohaDates %]
|
||||
</td>
|
||||
<td>[% f.file_size | html %]</td>
|
||||
<td><a class="delete_file" href="?invoiceid=[% invoiceid | html %]&op=delete&file_id=[% f.file_id | html %]">Delete</a></td>
|
||||
<td><a href="?invoiceid=[% invoiceid | uri %]&op=download&file_id=[% f.file_id | uri %]">Download</a></td>
|
||||
<td>
|
||||
<form action="invoice-files.pl" method="post">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
|
||||
<input type="hidden" name="file_id" value="[% f.file_id | html %]" />
|
||||
<input type="hidden" name="op" value="cud-delete" />
|
||||
<button type="submit" class="btn btn-default btn-xs delete_file">
|
||||
<i class="fa fa-trash"></i> Delete
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
<td><a class="btn btn-default btn-xs" href="?invoiceid=[% invoiceid | uri %]&op=download&file_id=[% f.file_id | uri %]"><i class="fa fa-download"></i> Download</a></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
|
@ -128,7 +138,7 @@
|
|||
"searching": false,
|
||||
"dom": "t"
|
||||
}));
|
||||
$("a.delete_file").click(function(){
|
||||
$(".delete_file").click(function(){
|
||||
return ( confirm( _("Are you sure you want to delete this file ?") ) );
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue