Skip to content

Commit

Permalink
Fixed stray closing divs in templates (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thutmose3 authored Feb 13, 2024
1 parent 0871c67 commit 6c81c79
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
15 changes: 6 additions & 9 deletions crispy_tailwind/templates/tailwind/field.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@
{# if field has a special template then use this #}
{% if field|is_select %}
<div class="{% if field_class %}{{ field_class }}{% else %}mb-3{% endif %}"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>

{% include 'tailwind/layout/select.html' %}
{% include 'tailwind/layout/select.html' %}
</div>
{% elif field|is_checkboxselectmultiple %}
<div class="{% if field_class %}{{ field_class }}{% else %}mb-3{% endif %}"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>

{% include 'tailwind/layout/checkboxselectmultiple.html' %}
{% include 'tailwind/layout/checkboxselectmultiple.html' %}
</div>
{% elif field|is_radioselect %}
<div class="{% if field_class %}{{ field_class }}{% else %}mb-3{% endif %}"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>

{% include 'tailwind/layout/radioselect.html' %}

{% include 'tailwind/layout/radioselect.html' %}
</div>
{% else %}

{# otherwise use django rendering with additional classes added #}
{% tailwind_field field %}
{% endif %}
Expand All @@ -36,5 +34,4 @@

</{% if tag %}{{ tag }}{% else %}div{% endif %}>


{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
{% endif %}
</div>
{% endfor %}
</div>
2 changes: 0 additions & 2 deletions crispy_tailwind/templates/tailwind/layout/radioselect.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@
{# include 'tailwind/layout/field_errors_block.html' <-- bs4 template adds this here. Currently this pack adds it in field.html #}
{% endif %}
{% endfor %}

</div>
1 change: 0 additions & 1 deletion crispy_tailwind/templates/tailwind/layout/select.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
</div>
{% endif %}
</div>
</div>

0 comments on commit 6c81c79

Please sign in to comment.