Permalink
Browse files

Non field errors are shown as error alerts.

  • Loading branch information...
1 parent e29601e commit e36bb00bb1fcd7f6d0ca042385ba42041fdaf4d6 @mpapierski mpapierski committed Mar 8, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 bootstrapform/templates/bootstrapform/form.html
@@ -1,4 +1,11 @@
-{{ form.non_field_errors }}
+{% if form.non_field_errors %}
+ <div class="alert alert-error">
+ <a class="close" data-dismiss="alert">&times;</a></a>
+ {% for non_field_error in form.non_field_errors %}
+ {{ non_field_error }}
+ {% endfor %}
+ </div>
+{% endif %}
{% for field in form.hidden_fields %}
{{ field }}

0 comments on commit e36bb00

Please sign in to comment.