Commits

Kevin Veroneau committed 5b5b9b8

Added bootstrap_form.html for form rendering.

  • Participants
  • Parent commits 0724dd7

Comments (0)

Files changed (1)

bootstrap_theme/templates/bootstrap_form.html

+{% for field in form %}
+<div class="control-group{% if field.errors %} error{% endif %}">
+  {% if not field.is_hidden %}
+  <label class="control-label" for="{{field.id_for_label}}">{{field.label}}</label>
+  {% endif %}
+  <div class="controls">
+    {{field}}
+    {% if field.errors %}<span class="help-inline">{% for err in field.errors %}{{err}}{% endfor %}</span>
+    {% else %}{% if field.help_text %}<span class="help-inline">{{field.help_text}}</span>{% endif %}{% endif %}
+  </div>
+</div>
+{% endfor %}