Bug 37823: Remove unreachable code in vendor contract page

The vendor contract management page has a few sections of code that are
meant to display a minimal confirmation message ("Data recorded") after
saving a new or edited vendor contract.

However, aqcontract.pl redirects back to the vendor details page after
saving, so this code is never reached and should be removed.

Test plan:
1. Apply patch
2. Go to the Acquisitions module and find a vendor
3. Click + New > Contract
4. Fill in the information and click Save
5. Click the "Contracts" link in the navigation menu on the left
--> Confirm that the contract was saved correctly
6. Click the Edit button and make changes to all fields
7. Save the information and click "Contracts" again
--> Confirm that the new information saved correctly

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Emily Lamancusa 2024-09-03 11:15:16 -04:00 committed by Katrin Fischer
parent eb0fb2e5ae
commit e1b660303f
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
2 changed files with 1 additions and 17 deletions

View file

@ -92,7 +92,6 @@ if ( $op eq 'add_form' ) {
#ADD_VALIDATE: called by add_form, used to insert/modify data in DB
elsif ( $op eq 'cud-add_validate' ) {
## Please see file perltidy.ERR
$template->param( add_validate => 1 );
my $is_a_modif = $input->param("is_a_modif");

View file

@ -15,9 +15,6 @@
[% IF ( else ) %]
[% tx("Contracts of {vendor}", { vendor = booksellername }) | html %]
[% END %]
[% IF ( add_validate ) %]
[% t("Data recorded") | html %]
[% END %]
[% IF ( delete_confirm ) %]
[% tx("Confirm deletion of contract '{contractnumber}'", { contractnumber = contractnumber }) | html %]
[% END %]
@ -68,12 +65,6 @@
[% END %]
[% END %]
[% IF ( add_validate ) %]
[% WRAPPER breadcrumb_item bc_active=1 %]
<span>Data recorded</span>
[% END %]
[% END %]
[% IF ( delete_confirm ) %]
[% WRAPPER breadcrumb_item bc_active=1 %]
<span>Confirm deletion of contract [% contractnumber | html %]</span>
@ -145,13 +136,7 @@
</form>
</div> <!-- /.page-section -->
[% END %]
[% IF ( add_validate ) %]
<h1>Data recorded</h1>
<form action="[% script_name | html %]" method="post">
[% INCLUDE 'csrf-token.inc' %]
<input type="submit" class="btn btn-primary" value="OK" />
</form>
[% END %]
[% IF ( delete_confirm ) %]
<div class="alert alert-warning">
<h1>Confirm deletion of contract <em>[% contractname | html %]</em></h1>