From 4be82a31ced886aa08c659fad553e7f9e353d94c Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 13 Jun 2019 20:26:53 +1000 Subject: [PATCH] Remove rows from order form --- .../order/order_wizard/select_parts.html | 9 ++++++-- .../order/order_wizard/select_pos.html | 21 +++++++++---------- InvenTree/static/script/inventree/order.js | 11 ++++++++++ InvenTree/templates/base.html | 1 + 4 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 InvenTree/static/script/inventree/order.js diff --git a/InvenTree/order/templates/order/order_wizard/select_parts.html b/InvenTree/order/templates/order/order_wizard/select_parts.html index 602b88bfe7..755d4812bc 100644 --- a/InvenTree/order/templates/order/order_wizard/select_parts.html +++ b/InvenTree/order/templates/order/order_wizard/select_parts.html @@ -25,7 +25,7 @@ - + @@ -35,6 +35,11 @@ {% include "hover_image.html" with image=part.image hover=False %} {{ part.full_name }} {{ part.description }} + diff --git a/InvenTree/order/templates/order/order_wizard/select_pos.html b/InvenTree/order/templates/order/order_wizard/select_pos.html index fdd6ff3e0b..bed01bbb5c 100644 --- a/InvenTree/order/templates/order/order_wizard/select_pos.html +++ b/InvenTree/order/templates/order/order_wizard/select_pos.html @@ -27,8 +27,7 @@ - - + {% for supplier in suppliers %} @@ -37,6 +36,15 @@ {{ supplier.name }} + - {% endfor %} diff --git a/InvenTree/static/script/inventree/order.js b/InvenTree/static/script/inventree/order.js new file mode 100644 index 0000000000..09e50fa4b6 --- /dev/null +++ b/InvenTree/static/script/inventree/order.js @@ -0,0 +1,11 @@ +function removeOrderRowFromOrderWizard(e) { + /* Remove a part selection from an order form. */ + + e = e || window.event; + + var src = e.target || e.srcElement; + + var row = $(src).attr('row'); + + $('#' + row).remove(); +} \ No newline at end of file diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index cc58d27197..43a9e7678b 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -99,6 +99,7 @@ InvenTree + {% block js_load %}
PartSupplierSelect Supplier Quantity
+ +
@@ -59,7 +64,7 @@
Supplier ItemsPurchase OrderSelect Purchase Order
{{ supplier.order_items|length }} + +
@@ -57,15 +65,6 @@ {% endif %}
- -