From 480ff5e6cbcd5aae4c349c827e64bbe993816103 Mon Sep 17 00:00:00 2001 From: eeintech Date: Thu, 30 Sep 2021 09:58:23 -0400 Subject: [PATCH] Hide submit button in modal when part is still active --- InvenTree/part/templates/part/part_base.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 0228c4df66..847baf8ab5 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -508,7 +508,8 @@ launchModalForm( "{% url 'part-delete' part.id %}", { - redirect: {% if part.category %}"{% url 'category-detail' part.category.id %}"{% else %}"{% url 'part-index' %}"{% endif %} + redirect: {% if part.category %}"{% url 'category-detail' part.category.id %}"{% else %}"{% url 'part-index' %}"{% endif %}, + no_post: {% if part.active %}true{% else %}false{% endif %}, } ); });