Move modal form error messages to the top

This commit is contained in:
Oliver Walters 2019-05-11 11:50:00 +10:00
parent 1b8ca34ddb
commit 4e4ee2742b

View File

@ -1,13 +1,14 @@
{% block pre_form_content %}
{% endblock %}
{% block non_field_error %}
{% 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 %}
{% endblock %}
{% block pre_form_content %}
{% endblock %}
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
{% csrf_token %}
{% load crispy_forms_tags %}