mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Modal forms now display non-field errors
- Critical for errors not relating to a particular field (e.g. unique_together) - Ref: https://stackoverflow.com/questions/7419535/how-to-render-django-form-errors-not-in-a-ul
This commit is contained in:
parent
73282801c9
commit
1c710e71a5
@ -1,5 +1,14 @@
|
||||
{% if form.non_field_errors %}
|
||||
<div class='alert alert-danger' role='alert' style='display: block;'>
|
||||
<b>Error Submitting Form:</b>
|
||||
{{ form.non_field_errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
|
||||
{% crispy form %}
|
||||
</form>
|
Loading…
Reference in New Issue
Block a user