maraujop/django-crispy-forms — Issue #23: Error alerts
Author: dbinit
Created: 2012-02-29 16:13:38+00:00
State: open

Miguel,

I've been working with error alerts and Bootstrap provides a JS plugin for a close icon. See [here](http://twitter.github.com/bootstrap/javascript.html#alerts).

I was about to add it to a pull request, but thought it might need to be a configuration option. Any thoughts on how to implement? Especially since the same thing isn't available on uni-form.

For now I've just overridden the template with my own:

```django

{% if form.non_field_errors %}

×
{% if form_error_title %}

{{ form_error_title }}

{% endif %}

{{ form.non_field_errors|unordered_list }}

{% endif %}
```

I also changed the \

to \

because I think it looks nicer.

It's obviously quite easy to just override the template, so that might be the best option.