Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Display alert only for non field errors

Artur Smętd9ab3f2366ef
diff --git a/templates/bootstrap3/form_errors.html b/templates/bootstrap3/form_errors.html
new file mode 100644
index 0000000000..b24996a95d
--- /dev/null
+++ b/templates/bootstrap3/form_errors.html
@@ -0,0 +1,9 @@
+{% if type == 'non_field' %}
+ <div class="alert alert-danger alert-dismissable alert-link">
+ <button class="close" type="button" data-dismiss="alert"
+ aria-hidden="true">&#215;</button>
+ {% for error in errors %}
+ {{ error }}{% if not forloop.last %}<br>{% endif %}
+ {% endfor %}
+ </div>
+{% endif %}