From a66bc2fe725d1666c004836b930512bd602583ce Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 5 May 2019 00:53:42 +1000 Subject: [PATCH] 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(); } }); });