{% load custom %}

<div class="module  {{ fieldset.classes }}">
    {% if fieldset.name %}<h5>{{ fieldset.name }}</h5>{% endif %}
    {% if fieldset.description %}
        <div class="description">{{ fieldset.description|safe }}</div>
    {% endif %}
    {% for line in fieldset %}

        <div class="row">
        <div class="input-field change-data col l12 {% if line.fields|length_is:'1' and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
            {% for field in line %}
                    {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}
                    {% if field.is_checkbox %}
                        {{ field.field }}{{ field.label_tag }}
                    {% else %}
                        {% if field.is_readonly %}
                            <p>{{ field.contents }}</p>
                        {% else %}
                            {{ field.field }}
                        {% endif %}
                        {{ field.label_tag }}
                        {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}
                    {% endif %}
                    {% if field.field.help_text %}
                        <small class="help-block">{{ field.field.help_text|safe }}</small>
                    {% endif %}
            {% endfor %}

        </div>
        </div>
    {% endfor %}
</div>
