From 7920eff672e7173b60faa2676a6e3d4228cb3e05 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Thu, 22 Apr 2021 15:59:16 -0700 Subject: [PATCH] get non-field form errors as toast messages --- netbox/templates/messages.html | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/netbox/templates/messages.html b/netbox/templates/messages.html index a9b341b70..3480a97b7 100644 --- a/netbox/templates/messages.html +++ b/netbox/templates/messages.html @@ -8,6 +8,7 @@ role="alert" aria-live="assertive" aria-atomic="true" + data-bs-delay="10000" >
@@ -21,5 +22,28 @@ >
- {% endfor %} {% endif %} + {% endfor %} + {% elif form and form.non_field_errors %} + {% for error in form.non_field_errors.get_json_data %} + + {% endfor %} + {% endif %}