Bug 19401: Add confirm message when deleting invoice

To test:
1) Go to Acquisitions
2) Go to Invoices (left nav menu)
3) Click Search (no need to filter results)
4) Click dropdown menu for an invoice, click Details
5) Click Delete
6) Notice invoice is deleted instantly
7) Apply patch and repeat steps 4 and 5
8) Confirm the confirm message shows and works as expected

Sponsored-by: Catalyst IT

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Aleisha Amohia 2017-10-03 02:47:40 +00:00 committed by Jonathan Druart
parent 367f6ef536
commit 0ec74621ca
1 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,9 @@
}
$(document).ready(function() {
$("#delete").click(function(){
return confirmDelete(_("Are you sure you want to delete this invoice?"));
});
$("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, {
bInfo: false,
bPaginate: false,
@ -123,7 +126,7 @@
<fieldset class="action">
<input type="submit" value="Save" />
[% UNLESS orders_loop.size %]
<a href="invoice.pl?op=delete&invoiceid=[% invoiceid %]">Delete</a>
<a href="invoice.pl?op=delete&invoiceid=[% invoiceid %]" id="delete">Delete</a>
[% END %]
</fieldset>
</form>