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 436-439 $(document).ready(function () { Link Here
436
        var item = button.data("booksellerid");
436
        var item = button.data("booksellerid");
437
        $("#booksellerid").val(item);
437
        $("#booksellerid").val(item);
438
    });
438
    });
439
    $("#deleteVendorForm").on("submit", function (e) {
440
        e.preventDefault();
441
        var id = $("#booksellerid").val();
442
        let options = {
443
            url: "/api/v1/acquisitions/vendors/" + id,
444
            method: "DELETE",
445
            contentType: "application/json",
446
        };
447
        $.ajax(options).then(function (thing, result) {
448
            window.location.href = "/cgi-bin/koha/vendors";
449
        });
450
    });
439
});
451
});
440
- 

Return to bug 38010