Skip to content

Commit

Permalink
radioselect rendering bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sefakilic committed Nov 16, 2012
1 parent 9527759 commit 48b966f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions django_forms_bootstrap/templates/bootstrap/field.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% include "bootstrap/_field_errors_block.html" %}
{% for choice in field.field.choices %}
<label class="checkbox">
<input type="checkbox" {% if choice.0 in field.value or choice.0 == field.value %}checked="checked"{% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0 }}">{{ choice.1 }}
<input type="checkbox" {% if choice.0|stringformat:"s" in field.value or choice.0|stringformat:"s" == field.value|stringformat:"s" %}checked="checked"{% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0 }}">{{ choice.1 }}
</label>
{% endfor %}
{% include "bootstrap/_field_help_text.html" %}
Expand All @@ -25,7 +25,7 @@
{% include "bootstrap/_field_errors_block.html" %}
{% for choice in field.field.choices %}
<label class="radio">
<input type="radio" {% if choice.0 == field.value %}checked="checked" {% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0 }}">{{ choice.1 }}
<input type="radio" {% if choice.0|stringformat:"s" == field.value|stringformat:"s" %}checked="checked" {% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0 }}">{{ choice.1 }}
</label>
{% endfor %}
{% include "bootstrap/_field_help_text.html" %}
Expand All @@ -46,4 +46,4 @@
{% endif %}
</div>
</div>
{% endif %}
{% endif %}

0 comments on commit 48b966f

Please sign in to comment.