From 67ea0fa8871b1afb3ac47d3e41718d009f2c1767 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 7 Sep 2019 19:53:47 +1000 Subject: [PATCH] Create a new part parameter template --- InvenTree/part/api.py | 2 +- InvenTree/templates/InvenTree/settings/part.html | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index 644c5d32e2..75c8f3a60f 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -412,7 +412,7 @@ part_star_api_urls = [ ] part_param_api_urls = [ - url(r'^template/?$', PartParameterTemplateList.as_view(), name='api-part-param-template-list'), + url(r'^template/$', PartParameterTemplateList.as_view(), name='api-part-param-template-list'), url(r'^.*$', PartParameterList.as_view(), name='api-part-param-list'), ] diff --git a/InvenTree/templates/InvenTree/settings/part.html b/InvenTree/templates/InvenTree/settings/part.html index 7a125e8e70..48588d4809 100644 --- a/InvenTree/templates/InvenTree/settings/part.html +++ b/InvenTree/templates/InvenTree/settings/part.html @@ -7,7 +7,11 @@ {% block settings %}

Part Parameter Templates

- +
+ +
+ +
{% endblock %} @@ -43,4 +47,12 @@ ] }); + $("#new-param").click(function() { + launchModalForm("{% url 'part-param-template-create' %}", { + success: function() { + $("#param-table").bootstrapTable('refresh'); + }, + }); + }); + {% endblock %} \ No newline at end of file