show error message in banner rather than an alert

the banner is a nicer user experience, and consistent with how we
display errors elsewhere in notify. For now pass through the error
message from JS, but we'll probably want to change that since the erorr
messages themselves are often a bit cryptic and unhelpful
This commit is contained in:
Leo Hemsted
2021-08-11 18:02:50 +01:00
parent c96a1dc0b7
commit 0b27d7e0a9
6 changed files with 64 additions and 37 deletions

View File

@@ -21,6 +21,15 @@
{% block maincolumn_content %}
{{ govukErrorMessage({
"classes": "banner-dangerous govuk-!-display-none",
"text": "There was a javascript error.",
"attributes": {
"aria-live": "polite",
"tabindex": '-1'
}
}) }}
<div class="govuk-grid-row">
<div class="govuk-grid-column-one-half">
{{ page_header(page_title) }}

View File

@@ -46,6 +46,16 @@
{% endset %}
<div class="govuk-grid-row">
{{ govukErrorMessage({
"classes": "banner-dangerous govuk-!-display-none",
"text": "There was a javascript error.",
"attributes": {
"aria-live": "polite",
"tabindex": '-1'
}
}) }}
{% if credentials %}
<div class="govuk-grid-column-five-sixths">
{{ page_header(page_title) }}