From e36bb00bb1fcd7f6d0ca042385ba42041fdaf4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Papierski?= Date: Thu, 8 Mar 2012 02:48:45 +0100 Subject: [PATCH] Non field errors are shown as error alerts. --- bootstrapform/templates/bootstrapform/form.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bootstrapform/templates/bootstrapform/form.html b/bootstrapform/templates/bootstrapform/form.html index 1691af0..c8592fd 100644 --- a/bootstrapform/templates/bootstrapform/form.html +++ b/bootstrapform/templates/bootstrapform/form.html @@ -1,4 +1,11 @@ -{{ form.non_field_errors }} +{% if form.non_field_errors %} +
+ × + {% for non_field_error in form.non_field_errors %} + {{ non_field_error }} + {% endfor %} +
+{% endif %} {% for field in form.hidden_fields %} {{ field }}