Add flag to hide labels of a form
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
{% for field in form.visible_fields %}
|
||||
<div class="group">
|
||||
{% if field.errors %}<div class="fieldWithErrors">{% endif %}
|
||||
<label class="label">{{ field.label_tag }}{% if field.field.required and not read_only and not form_hide_required_text %} ({% trans 'required' %}){% endif %}</label>
|
||||
{% if not hide_labels %}<label class="label">{{ field.label_tag }}{% if field.field.required and not read_only and not form_hide_required_text %} ({% trans 'required' %}){% endif %}</label>{% endif %}
|
||||
{% if field.errors %}<span class="error">{% for error in field.errors %}{{ error }}{% if not forloop.last %} | {% endif %}{% endfor %}</span></div>{% endif %}
|
||||
{{ field }}
|
||||
{% if field.help_text %}<span class="description">{{ field.help_text }}</span>{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user