Skip to content

Commit

Permalink
Fix dividers for checkboxes and radios and port updates from crispy-f…
Browse files Browse the repository at this point in the history
…orms-gds
  • Loading branch information
kbayliss committed Jul 15, 2024
1 parent 249decf commit 0c8a3d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions tbxforms/templates/tbx/layout/checkboxes.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
class="tbxforms-checkboxes__input"
id="id_{{ field.html_name }}_{{ forloop.counter }}"
value="{{ choice.0|unlocalize }}"
{% if choice.0 in field.value or choice.0|stringformat:"s" in field.value or choice.0|stringformat:"s" == field.value|stringformat:"s" %}
{% if choice.0 in field.value or choice.0|stringformat:"s" in field.value %}
checked="checked"
{% endif %}
{% if choice.hint %}
Expand All @@ -49,11 +49,11 @@
{{ choice.hint }}
</p>
{% endif %}

{% if choice.divider %}
<div class="tbxforms-checkboxes__divider">{{ choice.divider }}</div>
{% endif %}
</div>

{% if choice.divider %}
<div class="tbxforms-checkboxes__divider">{{ choice.divider }}</div>
{% endif %}
{% endfor %}
</div>

Expand Down
10 changes: 5 additions & 5 deletions tbxforms/templates/tbx/layout/radios.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
id="id_{{ field.html_name }}_{{ forloop.counter }}"
value="{{ choice.0|unlocalize }}"

{% if choice.0 in field.value or choice.0|stringformat:"s" in field.value or choice.0|stringformat:"s" == field.value|stringformat:"s" %}
{% if choice.0|stringformat:"s" == field.value|stringformat:"s" %}
checked="checked"
{% endif %}

Expand All @@ -51,11 +51,11 @@
</p>
{% endif %}
</div>

{% if choice.divider %}
<div class="tbxforms-radios__divider">{{ choice.divider }}</div>
{% endif %}
{% endfor %}

{% if choice.divider %}
<div class="tbxforms-radios__divider">{{ choice.divider }}</div>
{% endif %}
</div>

</fieldset>

0 comments on commit 0c8a3d6

Please sign in to comment.