From 576cdae5270b12b36b8a522ce37fac26d46dbde9 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Wed, 5 Jan 2022 20:30:42 +0100 Subject: add radio buttons to custom parameters --- client/templates/client/doc_create.html | 28 +++++++++++++++++++++----- client/templates/client/doc_edit.html | 35 ++++++++++++++++++++++++++++----- 2 files changed, 53 insertions(+), 10 deletions(-) (limited to 'client/templates') diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html index 2f70ef3..ce5f39d 100644 --- a/client/templates/client/doc_create.html +++ b/client/templates/client/doc_create.html @@ -6,6 +6,8 @@ Crea Iscrizione {% endblock %} +{% load app_filter %} + {% block content %}
@@ -107,12 +109,28 @@ {% endif %} {% if custom_data %} {% for key in keys %} -
-
- - + {% if key.key_extra|first in '!' %} +
+
+ {% with arr=key.key_extra|parse_multiple_choice %} + {{arr.0}} + {% for val in arr.1 %} +

+ {% endfor %} + {% endwith %} +
-
+ {% else %} +
+
+ + +
+
+ {% endif %} {% endfor %} {% endif %}
diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html index a622ea8..a9cc056 100644 --- a/client/templates/client/doc_edit.html +++ b/client/templates/client/doc_edit.html @@ -6,6 +6,8 @@ Modifica iscrizione {% endblock %} +{% load app_filter %} + {% block content %}
@@ -63,12 +65,35 @@ {% endif %} {% if custom_data %} {% for key in keys %} -
-
- - + {% if key.key_extra|first in '!' %} +
+
+ {% with arr=key.key_extra|parse_multiple_choice %} + {{arr.0}} + {% for val in arr.1 %} + {% if key.value == val %} +

+ {% else %} +

+ {% endif %} + {% endfor %} + {% endwith %} +
-
+ {% else %} +
+
+ + +
+
+ {% endif %} {% endfor %} {% endif %}
-- cgit v1.2.1