upload form now displays error messages once

This commit is contained in:
Thomas Nahuel Rusiecki 2024-11-11 04:28:41 -03:00 committed by pedro
parent 80083caf99
commit 90f057288d
1 changed files with 10 additions and 10 deletions

View File

@ -15,14 +15,14 @@
<div class="alert alert-danger alert-icon alert-icon-border alert-dismissible" role="alert">
<div class="icon"><span class="mdi mdi-close-circle-o"></span></div>
<div class="message">
{% for field, error in form.errors.items %}
{% for error in form.non_field_errors %}
{{ error }}<br />
{% endfor %}
<button class="btn-close" type="button" data-dismiss="alert" aria-label="Close"></button>
</div>
</div>
{% endif %}
{% bootstrap_form form %}
{% bootstrap_form form alert_error_type="fields" %}
<div class="form-actions-no-box">
<a class="btn btn-grey" href="{% url 'dashboard:unassigned_devices' %}">{% translate "Cancel" %}</a>
<input class="btn btn-green-admin" type="submit" name="submit" value="{% translate 'Save' %}" />