Update form for deleting a BOM item

This commit is contained in:
Oliver Walters 2019-05-13 23:00:04 +10:00
parent d679ee9971
commit 06e95819c9
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
{% extends "modal_delete_form.html" %}
{% block pre_form_content %}
Are you sure you want to delete this BOM item? Are you sure you want to delete this BOM item?
<br> <br>
Deleting this entry will remove the BOM row from the following part: Deleting this entry will remove the BOM row from the following part:
@ -7,3 +11,5 @@ Deleting this entry will remove the BOM row from the following part:
<b>{{ item.part.full_name }}</b> - <i>{{ item.part.description }}</i> <b>{{ item.part.full_name }}</b> - <i>{{ item.part.description }}</i>
</li> </li>
</ul> </ul>
{% endblock %}

View File

@ -193,7 +193,7 @@
$('#delete-part').click(function() { $('#delete-part').click(function() {
launchDeleteForm( launchModalForm(
"{% url 'part-delete' part.id %}", "{% 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 %}

View File

@ -184,7 +184,7 @@ function loadBomTable(table, options) {
table.on('click', '.bom-delete-button', function() { table.on('click', '.bom-delete-button', function() {
var button = $(this); var button = $(this);
launchDeleteForm(button.attr('url'), { launchModalForm(button.attr('url'), {
success: function() { success: function() {
reloadBomTable(table); reloadBomTable(table);
} }