Permalink
Browse files

Update to string utils

  • Loading branch information...
1 parent 61953b3 commit 3942e8b771690592615e73af9b5cf6b2a94ae7e1 @nathanborror committed Jun 20, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 basic/tools/templatetags/stringutils.py
View
6 basic/tools/templatetags/stringutils.py
@@ -36,12 +36,12 @@ def format_text(value):
@register.filter
def format_field(field):
t = Template("""
- <p class="ui-form-field" {% if field.is_hidden %} style="display:none;"{% endif %}>
+ <p class="ui-field{% if field.errors %} ui-error{% endif %}" {% if field.is_hidden %} style="display:none;"{% endif %}>
{{ field.label_tag }}
- <span class="ui-field">
+ <span class="field">
+ {% if field.errors %}<span class="ui-field-error">{{ field.errors|join:", " }}</span>{% endif %}
{{ field }}
{% if field.help_text %}<span class="ui-field-help">{{ field.help_text }}</span>{% endif %}
- {% if field.errors %}<span class="ui-field-error">{{ field.errors|join:", " }}</span>{% endif %}
</span>
</p>
""")

0 comments on commit 3942e8b

Please sign in to comment.