diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index a7bad6cae4..a3a9736a57 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -20,6 +20,7 @@
  • Deactivate
  • {% else %}
  • Activate
  • +
  • Delete
  • {% endif %} @@ -200,10 +201,10 @@ $('#delete-part').click(function() { launchModalForm( - "{% url 'part-delete' part.id %}", - { - redirect: {% if part.category %}"{% url 'category-detail' part.category.id %}"{% else %}"{% url 'part-index' %}"{% endif %} - }); + "{% url 'part-delete' part.id %}", + { + redirect: {% if part.category %}"{% url 'category-detail' part.category.id %}"{% else %}"{% url 'part-index' %}"{% endif %} + }); }); {% endblock %} diff --git a/InvenTree/part/templates/part/partial_delete.html b/InvenTree/part/templates/part/partial_delete.html index 6f2509996b..baa429e2a5 100644 --- a/InvenTree/part/templates/part/partial_delete.html +++ b/InvenTree/part/templates/part/partial_delete.html @@ -1,6 +1,11 @@ +{% extends "modal_form.html" %} + +{% block pre_form_content %} + Are you sure you want to delete part '{{ part.full_name }}'? {% if part.used_in_count %} +

    This part is used in BOMs for {{ part.used_in_count }} other parts. If you delete this part, the BOMs for the following parts will be updated: