mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +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'/>
|
<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>
|
||||||
@ -111,5 +116,14 @@ InvenTree | Build - {{ build }}
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#build-delete").on('click', function() {
|
||||||
|
launchModalForm(
|
||||||
|
"{% url 'build-delete' build.id %}",
|
||||||
|
{
|
||||||
|
redirect: "{% url 'build-index' %}",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user