Source

Lightning Talks / lightning / templates / uni_form / field.strict.html

Kenneth Love d9dd2e5 





























{% load uni_form_field %}

{% if field.is_hidden %}
    {{ field }}
{% else %}
    <div id="div_{{ field.auto_id }}" class="ctrlHolder{% if field.errors %} error{% endif %}{% if field|is_checkbox %} checkbox{% endif %} {% if field.field.widget.attrs.class %} {{ field.field.widget.attrs.class }}{% endif %}">
        {% for error in field.errors %}
            <p id="error_{{ forloop.counter }}_{{ field.auto_id }}" class="errorField">
                {{ error|safe }}
            </p>
        {% endfor %}

        {% if field|is_checkbox %}
            {{ field|with_class }}
        {% endif %}

        {% if field.label %}
            <label for="{{ field.auto_id }}" class="inlineLabel">
                {{ field.label|safe }}{% if field.field.required %}<em>*</em>{% endif %}
            </label>
        {% endif %}

        {% if not field|is_checkbox %}
            {{ field|with_class }}
        {% endif %}

        {% if field.help_text %}
            <p id="hint_{{ field.auto_id }}" class="formHint">{{ field.help_text|safe }}</p>
        {% endif %}
    </div>
{% endif %}