mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Adjust display of extra "add bom item" button at bottom of BOM table (#3773)
This commit is contained in:
@ -277,7 +277,7 @@
|
||||
</div>
|
||||
|
||||
{% if roles.part.change %}
|
||||
<button class='btn btn-success' type='button' title='{% trans "New BOM Item" %}' id='bom-item-new'>
|
||||
<button class='btn btn-success' type='button' title='{% trans "Add BOM Item" %}' id='bom-item-new'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Add BOM Item" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
@ -286,12 +286,6 @@
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
{% include "part/bom.html" with part=part %}
|
||||
{% if roles.part.change %}
|
||||
<button class='btn btn-success' type='button' title='{% trans "New BOM Item" %}' id='bom-item-new-footer'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Add BOM Item" %}
|
||||
</button>
|
||||
<br/>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -618,19 +612,7 @@
|
||||
});
|
||||
|
||||
$("[id^=bom-item-new]").click(function () {
|
||||
|
||||
var fields = bomItemFields();
|
||||
|
||||
fields.part.value = {{ part.pk }};
|
||||
fields.sub_part.filters = {
|
||||
active: true,
|
||||
};
|
||||
|
||||
constructForm('{% url "api-bom-list" %}', {
|
||||
fields: fields,
|
||||
method: 'POST',
|
||||
title: '{% trans "Create BOM Item" %}',
|
||||
focus: 'sub_part',
|
||||
addBomItem({{ part.pk }}, {
|
||||
onSuccess: function() {
|
||||
$('#bom-table').bootstrapTable('refresh');
|
||||
}
|
||||
|
Reference in New Issue
Block a user