Created
September 6, 2011 22:11
-
-
Save phretor/1199147 to your computer and use it in GitHub Desktop.
This file contains 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
{% extends 'form.html' %} | |
{% block form_body %} | |
{% for fieldset in form.fieldsets %} | |
<fieldset class="{{ fieldset.classes }}"> | |
{% if fieldset.legend %} | |
<legend>{{ fieldset.legend }}</legend> | |
{% endif %} | |
{% if fieldset.description %} | |
<p class="form-field-description">{{ fieldset.description }}</p> | |
{% endif %} | |
{% for field in fieldset %} | |
<div class="form-rows"> | |
{% for field in form %} | |
{% include 'form_utils/field.html' %} | |
{% endfor %} | |
<div> | |
{% endfor %} | |
</fieldset> | |
{% endfor %} | |
{% endblock %} |
This file contains 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
{% load i18n %} | |
{% block form_errors %} | |
{% if form.non_field_errors or form.errors %} | |
<div class="errors"> | |
<h4 class="errortitle">{% trans 'Uh oh...gotcha!' %}</h4> | |
{% if form.errors %} | |
<p>{% trans 'Some of the fields below have not been filled | |
correctly. Please double check them:' %}</p> | |
<ul> | |
{% for error in form.errors %} | |
<li class="error">{{ error|escape }}</li> | |
{% endfor %} | |
</ul> | |
{% else %}{# Must be non-field errors #} | |
{{ form.non_field_errors.as_ul }} | |
{% endif %} | |
</div> | |
{% endif %} | |
{% endblock %} | |
<div class="form-rows"> | |
{% block form_body %} | |
{% for field in form %} | |
{% include 'form_utils/field.html' %} | |
{% endfor %} | |
{% endblock %} | |
<div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment