mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Modal form now working on multiple pages
- Part index - Part category detail page(s)
This commit is contained in:
parent
e3b2bd7129
commit
99743c6bd0
@ -22,9 +22,9 @@
|
||||
{% endif %}
|
||||
|
||||
<div class='container-fluid'>
|
||||
<a href="{% url 'category-create' %}?category={{ category.id }}">
|
||||
<button class="btn btn-success">New Category</button>
|
||||
</a>
|
||||
<button type='button' class='btn btn-primary js-create-cat'>
|
||||
New Category
|
||||
</button>
|
||||
<a href="{% url 'part-create' %}?category={{ category.id }}">
|
||||
<button class="btn btn-success">New Part</button>
|
||||
</a>
|
||||
@ -39,4 +39,26 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class='modal fade' id='modal-cat'>
|
||||
<div class='modal-dialog'>
|
||||
<div class='modal-content'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
|
||||
|
||||
<script type='text/javascript'>
|
||||
|
||||
bindModalForm('#modal-cat',
|
||||
'.js-create-cat',
|
||||
"{% url 'category-create' %}",
|
||||
{category: {{ category.id }} });
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
@ -37,7 +37,7 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
bindModalForm('#modal-cat', '.js-create-cat', "{% url 'category-create' %}", {category: 1});
|
||||
bindModalForm('#modal-cat', '.js-create-cat', "{% url 'category-create' %}");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user