View | Details | Raw Unified | Return to bug 38010
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/delete_vendor.inc (-3 / +1 lines)
Lines 1-8 Link Here
1
<!-- Delete Vendor modal form -->
1
<!-- Delete Vendor modal form -->
2
<div id="deleteVendorModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="deleteVendorModalLabel">
2
<div id="deleteVendorModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="deleteVendorModalLabel">
3
    <form method="post" action="/cgi-bin/koha/acqui/supplier.pl">
3
    <form id="deleteVendorForm">
4
        [% INCLUDE 'csrf-token.inc' %]
5
        <input type="hidden" name="op" value="cud-delete" />
6
        <input type="hidden" name="booksellerid" id="booksellerid" value="" />
4
        <input type="hidden" name="booksellerid" id="booksellerid" value="" />
7
        <div class="modal-dialog" role="document">
5
        <div class="modal-dialog" role="document">
8
            <div class="modal-content">
6
            <div class="modal-content">
(-)a/koha-tmpl/intranet-tmpl/prog/js/acq.js (-1 / +12 lines)
Lines 455-458 $(document).ready(function () { Link Here
455
        var item = button.data("booksellerid");
455
        var item = button.data("booksellerid");
456
        $("#booksellerid").val(item);
456
        $("#booksellerid").val(item);
457
    });
457
    });
458
    $("#deleteVendorForm").on("submit", function (e) {
459
        e.preventDefault();
460
        var id = $("#booksellerid").val();
461
        let options = {
462
            url: "/api/v1/acquisitions/vendors/" + id,
463
            method: "DELETE",
464
            contentType: "application/json",
465
        };
466
        $.ajax(options).then(function (thing, result) {
467
            window.location.href = "/cgi-bin/koha/vendors";
468
        });
469
    });
458
});
470
});
459
- 

Return to bug 38010