mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Use the new error messages when uploading a letter
We now use the pattern of showing a box at the top of the page with the error. The error message has a heading and can have additional details. Error messages and the invalid pages get stored in the S3 metadata.
This commit is contained in:
@@ -4,10 +4,11 @@
|
||||
button_text="Choose file",
|
||||
alternate_link=None,
|
||||
alternate_link_text=None,
|
||||
hint=None
|
||||
hint=None,
|
||||
show_errors=True
|
||||
|
||||
) %}
|
||||
<form method="post" enctype="multipart/form-data" {% if action %}action="{{ action }}"{% endif %} class="{% if field.errors %}form-group-error{% endif %}" data-module="file-upload">
|
||||
<form method="post" enctype="multipart/form-data" {% if action %}action="{{ action }}"{% endif %} class="{% if field.errors and show_errors %}form-group-error{% endif %}" data-module="file-upload">
|
||||
<label class="file-upload-label" for="{{ field.name }}">
|
||||
<span class="visually-hidden">{{ field.label.text }}</span>
|
||||
{% if hint %}
|
||||
@@ -15,7 +16,7 @@
|
||||
{{ hint }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if field.errors %}
|
||||
{% if field.errors and show_errors %}
|
||||
<span class="error-message">
|
||||
{{ field.errors[0] }}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user