From 25216f05715392faaa859db0e5138bf53b61d5a0 Mon Sep 17 00:00:00 2001 From: Simon Caminada Date: Mon, 26 Mar 2018 21:52:14 +0200 Subject: [PATCH] field fix --- .../templates/project/includes/field.html | 18 ++++++++---------- src/project/templatetags/util_tags.py | 5 +++++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/project/templates/project/includes/field.html b/src/project/templates/project/includes/field.html index 25e8138..912c6b6 100644 --- a/src/project/templates/project/includes/field.html +++ b/src/project/templates/project/includes/field.html @@ -1,17 +1,15 @@ -{% with field.field.widget.input_type as type %} -
-
- {{ field.field.widget.input_type }} - {{ field.widget.input_type }} - {{ field.input_type }} -
- {% if label or type == 'checkbox' or type == 'radio' %} +{% load util_tags %} + +{% with type=field|field_type|upper type_checkbox='CHECKBOXSELECTMULTIPLE' type_radio='RADIOSELECT' %} +
+ {% if label or type == type_checkbox or type == type_radio %} {% endif %} - {% if type == 'checkbox' or type == 'radio' %} + {% if type == type_checkbox or type == type_radio %} {% for value, text in field.field.choices %} -