From 43f1d4e209f6a47dc7543b07dc354eeb4b9ca0ca Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 29 Aug 2022 16:38:07 +0200 Subject: [PATCH] add template binding search --- .../templates/inventory/binding_search.html | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 ereuse_devicehub/templates/inventory/binding_search.html diff --git a/ereuse_devicehub/templates/inventory/binding_search.html b/ereuse_devicehub/templates/inventory/binding_search.html new file mode 100644 index 00000000..28fbad0b --- /dev/null +++ b/ereuse_devicehub/templates/inventory/binding_search.html @@ -0,0 +1,74 @@ +{% extends "ereuse_devicehub/base_site.html" %} +{% block main %} + +
+

Inventory

+ +
+ +
+
+ +
+ +
+
+

{{ device.devicehub_id }}

+ +
+ +
+
Binding
+ {% if device.is_abstract() == 'Twin' or not device.placeholder %} +
+

+ Device with Dhid: {{ device.devicehub_id }} is a Twin device.
+ If you want to do a binding with this device, you need todo an Unbinding first.
+ You can to do this in here. +

+
+ {% else %} +
+

+ Be careful, binding implies changes in the data of a device that affect its traceability. +

+
+
+
+ {{ form_binding.csrf_token }} + {% for field in form_binding %} + {% if field != form_binding.csrf_token %} + +
+ {{ field.label(class_="form-label") }}: + {{ field }} + {% if field.errors %} +

+ {% for error in field.errors %} + {{ error }}
+ {% endfor %} +

+ {% endif %} +
+ + {% endif %} + {% endfor %} +
+ +
+
+
+ {% endif %} +
+ +
+
+
+
+
+{% endblock main %}