2020-11-26 03:03:55 +00:00
|
|
|
{% if form %}
|
|
|
|
{% if form.errors %}
|
|
|
|
<ul class="errors">
|
|
|
|
{% for _, error in form.errors.items %}
|
|
|
|
<li>{{ error }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{% for field in form %}
|
|
|
|
{% if field.field.widget.input_type == 'hidden' %}{{ field }}{% else %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="input-field col s12">
|
2020-11-26 05:01:47 +00:00
|
|
|
{% if field.field.widget.input_type == 'checkbox' %}
|
|
|
|
<label>
|
|
|
|
{{ field }}
|
|
|
|
<span>{{ field.label }}</span>
|
|
|
|
</label>
|
|
|
|
{% else %}
|
2020-11-26 03:03:55 +00:00
|
|
|
{{ field.label_tag }}
|
|
|
|
{{ field }}
|
2020-11-26 05:01:47 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if field.help_text %}<span class="help-text"><i class="fas fa-info-circle"></i> {{ field.help_text }}</span>{% endif %}
|
2020-11-26 03:03:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|