row_snippet.html 1.3 KB

1234567891011121314151617
  1. <div class="control-group{% if field.errors %} error{% endif %}">{% if field.label %}
  2. <label class="control-label" for="{{ field.html_id }}">{{ field.label }}:</label>{% endif %}{% if field.nested %}
  3. <div class="controls controls-nested">
  4. <div class="row">
  5. {% for subfield in field.nested %}{% with field=subfield nested=1 %}
  6. <div class="span{% widthratio field.width 100 max_width %}">{% include "_bootstrap/field_snippet.html" %}</div>
  7. {% endwith %}{% endfor %}
  8. </div>{% for error in field.errors %}
  9. <p class="help-block" style="font-weight: bold;">{{ error }}</p>{% endfor %}{% if field.widget != "checkbox" and field.help_text %}
  10. <p class="help-block">{{ field.help_text }}</p>{% endif %}
  11. </div>{% else %}
  12. <div class="controls">
  13. {% include "_bootstrap/field_snippet.html" %}{% for error in field.errors %}
  14. <p class="help-block" style="font-weight: bold;">{{ error }}</p>{% endfor %}{% if field.widget != "checkbox" and field.help_text %}
  15. <p class="help-block">{{ field.help_text }}</p>{% endif %}
  16. </div>{% endif %}
  17. </div>