Bugzilla – Attachment 162165 Details for
Bug 34478
Full CSRF protection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34478: (follow-up) Change invoice files delete link to POST
Bug-34478-follow-up-Change-invoice-files-delete-li.patch (text/plain), 2.50 KB, created by
Owen Leonard
on 2024-02-14 18:57:40 UTC
(
hide
)
Description:
Bug 34478: (follow-up) Change invoice files delete link to POST
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-02-14 18:57:40 UTC
Size:
2.50 KB
patch
obsolete
>From 9a48216dc70bf28f2209cbebdc3e050126b7b6e2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 14 Feb 2024 18:51:57 +0000 >Subject: [PATCH] Bug 34478: (follow-up) Change invoice files delete link to > POST > >--- > .../prog/en/modules/acqui/invoice-files.tt | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >index c0e98e3f5e..bc1c864f7c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >@@ -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 ?") ) ); > }); > }); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34478
:
154241
|
154242
|
154243
|
154244
|
154245
|
154246
|
154247
|
154248
|
154249
|
154250
|
154251
|
154252
|
154253
|
154254
|
155971
|
155972
|
155973
|
155974
|
155975
|
155976
|
155977
|
155978
|
155979
|
155980
|
155981
|
155982
|
155983
|
155984
|
155985
|
155986
|
155987
|
155988
|
155989
|
155990
|
156070
|
156071
|
156072
|
156073
|
156074
|
162114
|
162165
|
162630