2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 20:16:44 +00:00

Add button to delete a build (only if it has been cancelled)

This commit is contained in:
Oliver Walters 2019-08-15 19:35:12 +10:00
parent 03b7e3a815
commit b8d7cefa95

View File

@ -38,6 +38,11 @@ InvenTree | Build - {{ build }}
<span class='glyphicon glyphicon-remove'/> <span class='glyphicon glyphicon-remove'/>
</button> </button>
{% endif %} {% 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>
</div> </div>
</p> </p>
@ -112,4 +117,13 @@ InvenTree | Build - {{ build }}
); );
}); });
$("#build-delete").on('click', function() {
launchModalForm(
"{% url 'build-delete' build.id %}",
{
redirect: "{% url 'build-index' %}",
}
);
});
{% endblock %} {% endblock %}