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:
@@ -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,
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user