mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-14 15:41:10 +00:00
Add modals for editing or deleting part parameters
This commit is contained in:
5
InvenTree/part/templates/part/param_delete.html
Normal file
5
InvenTree/part/templates/part/param_delete.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{% extends "modal_delete_form.html" %}
|
||||
|
||||
{% block pre_form_content %}
|
||||
Are you sure you want to remove this parameter?
|
||||
{% endblock %}
|
@@ -29,8 +29,8 @@
|
||||
<td>
|
||||
{{ param.template.units }}
|
||||
<div class='btn-group' style='float: right;'>
|
||||
<button title='Edit' class='btn btn-default btn-glyph' type='button'><span class='glyphicon glyphicon-edit'/></button>
|
||||
<button title='Delete' class='btn btn-default btn-glyph' type='button'><span class='glyphicon glyphicon-trash'/></button>
|
||||
<button title='Edit' class='btn btn-default btn-glyph param-edit' url="{% url 'part-param-edit' param.id %}" type='button'><span class='glyphicon glyphicon-edit'/></button>
|
||||
<button title='Delete' class='btn btn-default btn-glyph param-delete' url="{% url 'part-param-delete' param.id %}" type='button'><span class='glyphicon glyphicon-trash'/></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -61,4 +61,20 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('.param-edit').click(function() {
|
||||
var button = $(this);
|
||||
|
||||
launchModalForm(button.attr('url'), {
|
||||
reload: true,
|
||||
});
|
||||
});
|
||||
|
||||
$('.param-delete').click(function() {
|
||||
var button = $(this);
|
||||
|
||||
launchModalForm(button.attr('url'), {
|
||||
reload: true,
|
||||
});
|
||||
});
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user