Skip to content

Commit

Permalink
Fix nesting of labels
Browse files Browse the repository at this point in the history
* This fixes issue #22
  • Loading branch information
Norman Rusch committed Jul 26, 2017
1 parent 247e2f5 commit 2af31cf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions barbeque/templates/barbeque/forms/row/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@
{% set field_id=field|id %}
{% endif %}

<label
class="form-field-{{ type }} has-name-{{ name|slugify }}{{ required|yesno:' is-required,' }}{% if errors %} has-errors{% endif %}{% if classes %} {{ classes }}{% endif %}"
for="{{ field_id }}">
<div class="form-field-{{ type }} has-name-{{ name|slugify }}{{ required|yesno:' is-required,' }}{% if errors %} has-errors{% endif %}{% if classes %} {{ classes }}{% endif %}">
{% if type == 'checkboxinput' %}
{% block field_checkboxinput %}
{% formfield field using 'barbeque/forms/field/checkboxinput.html' %}
{% endblock %}
{% endif %}

<span class="label">
<label class="label" for="{{ field_id }}">
{% block label %}{{ label|safe }}{% endblock %}
</span>
</label>

{% if type != 'checkboxinput' %}
<span class="field">
Expand Down Expand Up @@ -64,7 +62,7 @@
{% endblock %}
</sub>
{% endif %}
</label>
</div>
{% endfor %}
{% block hidden_fields %}
{% for field in hidden_fields %}{{ field.as_hidden }}{% endfor %}
Expand Down

0 comments on commit 2af31cf

Please sign in to comment.