mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add button to delete a build (only if it has been cancelled)
This commit is contained in:
parent
03b7e3a815
commit
b8d7cefa95
@ -38,6 +38,11 @@ InvenTree | Build - {{ build }}
|
||||
<span class='glyphicon glyphicon-remove'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if build.status == BuildStatus.CANCELLED %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='build-delete' title='Delete Build'>
|
||||
<span class='glyphicon glyphicon-trash'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
@ -111,5 +116,14 @@ InvenTree | Build - {{ build }}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("#build-delete").on('click', function() {
|
||||
launchModalForm(
|
||||
"{% url 'build-delete' build.id %}",
|
||||
{
|
||||
redirect: "{% url 'build-index' %}",
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user