Created
August 3, 2017 12:58
-
-
Save rguliev/70c59cdc8ad319e30c9d808cdac2041a to your computer and use it in GitHub Desktop.
django-uni-form + Twitter Bootstrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if field.is_hidden %} | |
{{ field }} | |
{% else %} | |
<div class="control-group {% if field.errors %}error{% endif %}"> | |
<label for="{{ field.auto_id }}" {% if field.field.required %}class="control-label"{% endif %}> | |
{% if field.field.required %}<b>{% endif %}{{ field.label|safe }}{% if field.field.required %}*</b>{% endif %} | |
</label> | |
<div class="controls"> | |
{{ field }} | |
{% if field.errors %} | |
<span class="help-inline">{% for error in field.errors %}{{ error }}<br/> {% endfor %}</span> | |
{% endif %} | |
{% if field.help_text%} | |
<p class="help-block"> | |
{{ field.help_text|safe }} | |
</p> | |
{% endif %} | |
</div> | |
</div> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment