Bugzilla – Attachment 171471 Details for
Bug 37913
Remove more unreachable code in aqcontract.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37913: Remove more unreachable code in aqcontract.tt
Bug-37913-Remove-more-unreachable-code-in-aqcontra.patch (text/plain), 3.60 KB, created by
Paul Derscheid
on 2024-09-13 15:00:21 UTC
(
hide
)
Description:
Bug 37913: Remove more unreachable code in aqcontract.tt
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2024-09-13 15:00:21 UTC
Size:
3.60 KB
patch
obsolete
>From 359ae67c847297dab0655074bc03bb4cac01f0d5 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Thu, 12 Sep 2024 15:07:50 -0700 >Subject: [PATCH] Bug 37913: Remove more unreachable code in aqcontract.tt > >When you successfully delete an acquisitions contract, you are redirected to >the page with the vendor details, which shows contracts for that vendor, which >shows you that the contract you deleted was deleted. > >The aqcontract.tt template has a block in [% IF ( delete_confirmed ) %] (which >is never set) that thinks it will show you a '<h1>Contract deleted</h1>' and >make you click an OK button. That block has never been shown, but the button >is in a form which POSTs without an 'op' param, which is now forbidden by the >CSRF code, and will be caught by a test once bug 37728 updates the test. > >There's nothing visible to test, so the test plan just makes sure nothing >blows up and you can still delete a contract. > >1. Nothing will change, so start with the patch applied >2. Acquistions - click the Search button to search for vendors >3. New -> Contract >4. Give it a name, a start date, and an end date, and Save >5. In the list of contracts for My Vendor, click the Delete button for > the contract you created >6. In the confirmation page asking if you wanted to delete, click 'Yes, > delete contract' >7. Note that you are at acqui/supplier.pl?booksellerid=1, the details page > for the vendor, and your contract isn't listed at the bottom of the page, > and especially that you weren't shown a page that just said "Contract > deleted." > >Sponsored-by: Chetco Community Public Library >Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > .../prog/en/modules/admin/aqcontract.tt | 18 +----------------- > 1 file changed, 1 insertion(+), 17 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt >index c8a6d5f859..4986b3f5cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt >@@ -18,9 +18,7 @@ > [% IF ( delete_confirm ) %] > [% tx("Confirm deletion of contract '{contractnumber}'", { contractnumber = contractnumber }) | html %] > [% END %] >- [% IF ( delete_confirmed ) %] >- [% t("Contract deleted") | html %] >- [% END %] › >+ › > [% t("Contracts") | html %] › > [% t("Acquisitions") | html %] › > [% t("Koha") | html %] >@@ -70,12 +68,6 @@ > <span>Confirm deletion of contract [% contractnumber | html %]</span> > [% END %] > [% END %] >- >- [% IF ( delete_confirmed ) %] >- [% WRAPPER breadcrumb_item bc_active=1 %] >- <span>Contract deleted</span> >- [% END %] >- [% END %] > [% END #/ WRAPPER breadcrumbs %] > [% END #/ WRAPPER sub-header.inc %] > >@@ -162,14 +154,6 @@ > </form> > </div> > [% END %] >- [% IF ( delete_confirmed ) %] >- <h1>Contract deleted</h1> >- <form action="[% script_name | html %]" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >- <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" /> >- <input type="submit" class="btn btn-primary" value="OK" /> >- </form> >- [% END %] > [% IF ( else ) %] > <h1>Contract(s) of [% booksellername | html %]</h1> > [% IF ( loop ) %] >-- >2.46.0
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 37913
:
171430
|
171456
| 171471