-
-
Save luzfcb/21897d8dbced585f7319562a4e918148 to your computer and use it in GitHub Desktop.
Form Dinamico django horinzontal span6
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 form.non_field_errors %} | |
<div class="alert alert-error"> | |
{% for error in form.non_field_errors %} | |
{{error}} | |
{% endfor %} | |
</div> | |
{% endif %} | |
<form class="form-horizontal" action="{{ form_action }}" method="post" | |
enctype="multipart/form-data" id="form-novo-movimento" name="form-novo-movimento"> | |
{% csrf_token %} | |
<div class="row-fluid"> | |
{% for form_field in form %} | |
{% if not form_field.is_hidden %} | |
<div class="span6"> | |
<div class="control-group {% if form_field.errors %}error{% endif %}" > | |
<label class="control-label" for="{{ form_field.id_for_label }}"><small>{{ form_field.label }}:</small></label> | |
<div class="controls"> | |
{{ form_field }} | |
{% if form_field.errors %} | |
{% for error in form_field.errors %} | |
<p id="error_{{ forloop.counter }}_{{ form_field.auto_id }}" | |
class="help-block"> | |
<strong>{{ error }}</strong></p> | |
{% endfor %} | |
{% endif %} | |
{% if form_field.help_text %} | |
<p id="hint_{{ form_field.auto_id }}" | |
class="muted">{{ form_field.help_text|safe }}</p> | |
{% endif %} | |
</div> | |
</div> | |
</div> | |
{% else %} | |
{{ form_field }} | |
{% endif %} | |
{% endfor %} | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment