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 %} {% block non_field_error %}
{% endblock %}
{% if form.non_field_errors %} {% if form.non_field_errors %}
<div class='alert alert-danger' role='alert' style='display: block;'> <div class='alert alert-danger' role='alert' style='display: block;'>
<b>Error Submitting Form:</b> <b>Error Submitting Form:</b>
{{ form.non_field_errors }} {{ form.non_field_errors }}
</div> </div>
{% endif %} {% endif %}
{% endblock %}
{% block pre_form_content %}
{% endblock %}
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data"> <form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}