mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-14 15:41:10 +00:00
More modal forms
- supplier-part-edit - supplier-part-delete
This commit is contained in:
@@ -74,7 +74,8 @@ $(document).ready(function(){
|
||||
|
||||
$("#new-bom-item").click(function () {
|
||||
launchModalForm("#modal-form",
|
||||
"{% url 'bom-item-create' %}/?parent={{ part.id }}");
|
||||
"{% url 'bom-item-create' %}",
|
||||
{data: {parent: {{ part.id }} }});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@@ -1,18 +1,21 @@
|
||||
{% extends "part/part_base.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% block details %}
|
||||
|
||||
{% include 'part/tabs.html' with tab='suppliers' %}
|
||||
|
||||
<h3>Part Suppliers</h3>
|
||||
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped" id='supplier-table' data-sorting='true'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SKU</th>
|
||||
<th>Supplier</th>
|
||||
<th>MPN</th>
|
||||
<th>URL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for spart in part.supplier_parts.all %}
|
||||
<tr>
|
||||
<td><a href="{% url 'supplier-part-detail' spart.id %}">{{ spart.SKU }}</a></td>
|
||||
@@ -25,12 +28,38 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class='container-fluid'>
|
||||
<a href="{% url 'supplier-part-create' %}?part={{ part.id }}">
|
||||
<button class="btn btn-success">New Supplier Part</button>
|
||||
</a>
|
||||
<button class="btn btn-success" id='supplier-create'>New Supplier Part</button>
|
||||
</div>
|
||||
|
||||
{% include 'modal.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
<script type='text/javascript' src="{% static 'script/footable.js' %}"></script>``
|
||||
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
|
||||
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function (){
|
||||
|
||||
$('#supplier-table').footable();
|
||||
|
||||
$('#supplier-create').click(function () {
|
||||
launchModalForm("#modal-form",
|
||||
"{% url 'supplier-part-create' %}",
|
||||
{
|
||||
reload: true,
|
||||
data: {part: {{ part.id }} }
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user