From ecb8e71d756246bda529747552fd5ddeb338ad62 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 5 May 2019 00:46:11 +1000 Subject: [PATCH 1/2] Fixed a missing form title --- InvenTree/part/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index d14827a446..6ba810b67d 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -619,3 +619,4 @@ class SupplierPartDelete(AjaxDeleteView): model = SupplierPart success_url = '/supplier/' ajax_template_name = 'company/partdelete.html' + ajax_form_title = 'Delete Supplier Part' From a66bc2fe725d1666c004836b930512bd602583ce Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 5 May 2019 00:53:42 +1000 Subject: [PATCH 2/2] Reload after adjusting Part attachments --- InvenTree/part/templates/part/attachments.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/InvenTree/part/templates/part/attachments.html b/InvenTree/part/templates/part/attachments.html index 24c69f23f7..d1aa037870 100644 --- a/InvenTree/part/templates/part/attachments.html +++ b/InvenTree/part/templates/part/attachments.html @@ -37,7 +37,10 @@ {{ block.super }} $("#new-attachment").click(function() { - launchModalForm("{% url 'part-attachment-create' %}?part={{ part.id }}"); + launchModalForm("{% url 'part-attachment-create' %}?part={{ part.id }}", + { + reload: true, + }); }); $("#attachment-table").on('click', '.attachment-edit-button', function() { @@ -45,9 +48,8 @@ launchModalForm(button.attr('url'), { - success: function() { - } - }); + reload: true, + }); }); $("#attachment-table").on('click', '.attachment-delete-button', function() { @@ -55,6 +57,7 @@ launchDeleteForm(button.attr('url'), { success: function() { + location.reload(); } }); });