Bug 15884 - Vendor contract deletion warning is incorrectly styled

When deleting a contract in  Acquisitions -> Vendor -> Contracts, the
deletion confirmation message is not styled with the standard "dialog
alert" <div>. This patch modifies the confirmation markup to match the
standard.

To test, apply the patch and go to Acquisitions -> [ a vendor] ->
Contracts

- Try deleting a contract. The confirmation box should have the standard
  "dialog alert" class.
- Test the 'confirm' and 'cancel' actions and make sure both complete
  correctly.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit a4f1103e41)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Owen Leonard 2016-02-23 09:16:13 -05:00 committed by Frédéric Demians
parent d3c1dfcc49
commit 73dad06484
1 changed files with 11 additions and 9 deletions

View File

@ -141,9 +141,8 @@ function Check(ff) {
</form>
[% END %]
[% IF ( delete_confirm ) %]
<form action="[% script_name %]" method="post">
<fieldset>
<legend>Confirm deletion of contract [% contractnumber %]</legend>
<div class="dialog alert">
<h3>Confirm deletion of contract <i>[% contractname %]</i></h3>
<table>
<tr><th scope="row">Contract number:</th><td>[% contractnumber %]</td></tr>
<tr><th scope="row">Contract name:</th><td>[% contractname %]</td></tr>
@ -152,15 +151,18 @@ function Check(ff) {
<tr><th scope="row">Contract end date:</th><td>[% contractenddate %]</td></tr>
<tr><th scope="row">Vendor:</th><td>[% booksellername %]</td></tr>
</table>
<fieldset class="action">
<form action="[% script_name %]" method="post">
<input type="hidden" name="op" value="delete_confirmed" />
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
<input type="hidden" name="contractnumber" value="[% contractnumber %]" />
<input type="submit" value="Delete this contract" />
<a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]&amp;contractnumber=[% contractnumber %]">Cancel</a>
</fieldset>
</fieldset>
</form>
<input type="submit" class="approve" value="Yes, delete contract"/>
</form>
<form action="/cgi-bin/koha/admin/aqcontract.pl" method="get">
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
<input type="hidden" name="contractnumber" value="[% contractnumber %]" />
<input type="submit" class="deny" value="No, do not delete"/>
</form>
</div>
[% END %]
[% IF ( delete_confirmed ) %]
<h3>Contract deleted</h3>