2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 05:46:34 +00:00

Refactor SupplierPartCreate form

This commit is contained in:
Oliver Walters
2021-07-18 22:21:11 +10:00
parent b1165af3c3
commit 56fa6c512b
14 changed files with 129 additions and 409 deletions

View File

@ -801,27 +801,16 @@
)
});
function reloadSupplierPartTable() {
$('#supplier-part-table').bootstrapTable('refresh');
}
$('#supplier-create').click(function () {
launchModalForm(
"{% url 'supplier-part-create' %}",
{
reload: true,
data: {
part: {{ part.id }}
},
secondary: [
{
field: 'supplier',
label: '{% trans "New Supplier" %}',
title: '{% trans "Create new supplier" %}',
},
{
field: 'manufacturer',
label: '{% trans "New Manufacturer" %}',
title: '{% trans "Create new manufacturer" %}',
}
]
});
createSupplierPart({
part: {{ part.pk }},
onSuccess: reloadSupplierPartTable,
});
});
$("#supplier-part-delete").click(function() {