From e0e996a6c390a849484879ec27743ca3d545aa37 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 11 Feb 2020 00:00:03 +1100 Subject: [PATCH] Add buttons to select or upload part images --- InvenTree/part/templates/part/part_base.html | 26 +++++-------------- InvenTree/part/templates/part/part_thumb.html | 20 ++++++++++++++ 2 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 InvenTree/part/templates/part/part_thumb.html diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index cecf4244ea..27e5aedb83 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -25,18 +25,7 @@
-
-
-
- -
- Select Part Image -
+ {% include "part/part_thumb.html" %}

{{ part.full_name }} @@ -209,13 +198,12 @@ }); }); - $("#part-thumb").click(function() { - launchModalForm( - "{% url 'part-image-upload' part.id %}", - { - reload: true - } - ); + $("#part-image-upload").click(function() { + launchModalForm("{% url 'part-image-upload' part.id %}", + { + reload: true + } + ); }); diff --git a/InvenTree/part/templates/part/part_thumb.html b/InvenTree/part/templates/part/part_thumb.html new file mode 100644 index 0000000000..e99b5106c0 --- /dev/null +++ b/InvenTree/part/templates/part/part_thumb.html @@ -0,0 +1,20 @@ +{% load static %} +{% load i18n %} + +
+
+
+ +
+
+
+ + +
+
+
\ No newline at end of file