Merge branch 'develop' of git.divio.com:wwwtagesschule-elementach into develop

standalone
Simon Caminada 8 years ago
commit 133d9e245e

@ -1,17 +1,15 @@
{% with field.field.widget.input_type as type %}
<div class="form__field{% if label or type == 'checkbox' or type == 'radio' %} form__field--label{% endif %}">
<div style="display: none;">
{{ field.field.widget.input_type }}
{{ field.widget.input_type }}
{{ field.input_type }}
</div>
{% if label or type == 'checkbox' or type == 'radio' %}
{% load util_tags %}
{% with type=field|field_type|upper type_checkbox='CHECKBOXSELECTMULTIPLE' type_radio='RADIOSELECT' %}
<div class="form__field{% if label or type == type_checkbox or type == type_radio %} form__field--label{% endif %}">
{% if label or type == type_checkbox or type == type_radio %}
<label class="form__field__label" for="{{ field.id_for_label }}"><span>{{ field.label }}:</span></label>
{% endif %}
{% if type == 'checkbox' or type == 'radio' %}
{% if type == type_checkbox or type == type_radio %}
{% for value, text in field.field.choices %}
<input type="{{ type }}" value="{{ value }}" name="{{ field.name }}"
<input type="{% if type == type_checkbox %}checkbox{% else %}radio{% endif %}"
value="{{ value }}" name="{{ field.name }}"
id="{{ field.auto_id }}_{{ forloop.counter0 }}">
<label for="{{ field.auto_id }}_{{ forloop.counter0 }}">
<span class="form__field__choice__icon">

@ -19,3 +19,8 @@ def page_image_cropping(id):
return Page.objects.get(pk=id).imageextension.cropping
except:
return None
@register.filter
def field_type(field):
return field.field.widget.__class__.__name__

Loading…
Cancel
Save