Skip to content

Commit

Permalink
For ticket pydanny#7, this puts the errors paragraph into the right l…
Browse files Browse the repository at this point in the history
…ocation to match how uni-form expects errors to go.
  • Loading branch information
pydanny committed Aug 25, 2009
1 parent 31066c3 commit dbda5b7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions uni_form/templates/uni_form/field.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
{{ field }}
{% else %}
<div id="div_{{ field.auto_id }}" class="ctrlHolder{% if field.errors %} error{% endif %}{% if field|is_checkbox %} checkbox{% endif %}">
{% for error in field.errors %}
<p id="error_{{ forloop.counter }}_{{ field.auto_id }}" class="errorField">
{{ error }}
</p>
{% endfor %}
{% if field|is_checkbox %}
{{ field|with_class }}
{% if field.label %}
Expand All @@ -17,14 +22,7 @@
</label>
{% endif %}
{{ field|with_class }}
{% endif %}

{% for error in field.errors %}
<p id="error_{{ field.auto_id }}" class="errorField">
{{ error }}
</p>
{% endfor %}

{% endif %}
{% if field.help_text %}
<p id="hint_{{ field.auto_id }}" class="formHint">{{ field.help_text|safe }}</p>
{% endif %}
Expand Down

0 comments on commit dbda5b7

Please sign in to comment.