2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Refactor delete view for PartAttachment and StockItemAttachment

This commit is contained in:
Oliver
2021-06-30 12:58:41 +10:00
parent 4e23dbd0af
commit 8f47035a7b
6 changed files with 17 additions and 57 deletions

View File

@@ -72,13 +72,14 @@
$("#attachment-table").on('click', '.attachment-delete-button', function() {
var button = $(this);
var pk = button.attr('pk');
var url = `/api/part/attachment/${pk}/`;
var url = `/part/attachment/${button.attr('pk')}/delete/`;
launchModalForm(url, {
success: function() {
location.reload();
}
constructForm(url, {
method: 'DELETE',
confirmMessage: '{% trans "Confirm Delete Operation" %}',
title: '{% trans "Delete Attachment" %}',
reload: true,
});
});