Fix form errors and hidden form errors
The conversion to django left out the 'prettyfying' of form and
hidden form errors, as these could occur when running live, restore
this behavior.
Patch by: Sverre Rabbelier
--- a/app/soc/templates/soc/templatetags/_as_table.html Thu Jan 22 13:50:25 2009 +0000
+++ b/app/soc/templates/soc/templatetags/_as_table.html Thu Jan 22 16:01:51 2009 +0000
@@ -13,8 +13,18 @@
{% endcomment %}
{% load forms_helpers %}
-{{ top_errors }}
-{{ hidden_field_errors }}
+{% if hidden_field_errors or top_errors %}
+<ul class="errorlist">
+{% for field, error in hidden_field_errors %}
+<li><span class="formfielderrorlabel">
+(Hidden field {{ field }}) {{ error }}
+</span></li>
+{% endfor %}
+{% for error in top_errors %}
+<li><span class="formfielderrorlabel"> {{ error }} </span></li>
+{% endfor %}
+</ul>
+{% endif %}
{% for field, required, example_text in fields %}
{% block fields_loop %}