Merge pull request #30 from jweiher/master

Fix behavior for auto_id=False on form creation
This commit is contained in:
tzangms 2013-09-10 01:14:32 -07:00
commit 62af3e0766

View File

@ -4,10 +4,11 @@
{% if field|is_checkbox %} {% if field|is_checkbox %}
<div class="{{ classes.single_value }}"> <div class="{{ classes.single_value }}">
<div class="checkbox"> <div class="checkbox">
{% if field.auto_id %}
<label> <label>
{{ field }} <span>{{ field.label }}</span> {{ field }} <span>{{ field.label }}</span>
</label> </label>
{% endif %}
{% for error in field.errors %} {% for error in field.errors %}
<span class="help-block">{{ error }}</span> <span class="help-block">{{ error }}</span>
{% endfor %} {% endfor %}
@ -20,8 +21,9 @@
</div> </div>
</div> </div>
{% else %}{% if field|is_radio %} {% else %}{% if field|is_radio %}
{% if field.auto_id %}
<label class="control-label {{ classes.label }}">{{ field.label }}</label> <label class="control-label {{ classes.label }}">{{ field.label }}</label>
{% endif %}
<div class="{{ classes.value }}"> <div class="{{ classes.value }}">
{% for choice in field %} {% for choice in field %}
<div class="radio"> <div class="radio">
@ -44,8 +46,9 @@
</div> </div>
{% else %} {% else %}
{% if field.auto_id %}
<label class="control-label {{ classes.label }}" for="{{ field.auto_id }}">{{ field.label }}</label> <label class="control-label {{ classes.label }}" for="{{ field.auto_id }}">{{ field.label }}</label>
{% endif %}
<div class="{{ classes.value }}"> <div class="{{ classes.value }}">
{{ field }} {{ field }}