From 50987f47b07092761c419d096c3f233cdff02cf3 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 22 May 2020 23:37:26 +1000 Subject: [PATCH] Add a buttony thing --- InvenTree/stock/templates/stock/item_tests.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/InvenTree/stock/templates/stock/item_tests.html b/InvenTree/stock/templates/stock/item_tests.html index b311f13584..c79068349d 100644 --- a/InvenTree/stock/templates/stock/item_tests.html +++ b/InvenTree/stock/templates/stock/item_tests.html @@ -13,10 +13,13 @@
- {% if user.is_staff %} {% endif %} + + {% if item.part.has_test_report_templates %} + + {% endif %}
@@ -43,6 +46,17 @@ function reloadTable() { //$("#test-result-table").bootstrapTable("refresh"); } +{% if item.part.has_test_report_templates %} +$("#test-report").click(function() { + launchModalForm( + "{% url 'stock-item-test-report-select' item.id %}", + { + follow: true, + } + ); +}); +{% endif %} + {% if user.is_staff %} $("#delete-test-results").click(function() { launchModalForm(