-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render error summary on cya (in case a developer overrides the statem…
…ent of truth)
- Loading branch information
1 parent
bd5c8c3
commit cb0980c
Showing
3 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% macro errorSummary(fields, title='There was a problem') -%} | ||
{%- if fields.validated and not fields.valid -%} | ||
<div class="error-summary" role="group" aria-labelledby="error-summary-heading" tabindex="-1"> | ||
<h1 class="heading-medium error-summary-heading" id="error-summary-heading"> | ||
{{ title }} | ||
</h1> | ||
<ul class="error-summary-list"> | ||
{%- for error in fields.errors -%} | ||
<li><a href="#{{error.id}}">{{error.message}}</a></li> | ||
{%- endfor -%} | ||
</ul> | ||
</div> | ||
{%- endif -%} | ||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters