From b731cd62bbec88b0d0327c06d84fc4296433a0a0 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Thu, 12 Dec 2024 23:08:25 -0800 Subject: [PATCH] adding error annoucement --- app/main/views/templates.py | 1 + .../components/components/input/template.njk | 2 +- app/templates/components/textbox.html | 7 ++++--- app/templates/views/edit-sms-template.html | 13 +++++++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/app/main/views/templates.py b/app/main/views/templates.py index 5c59e1e7c..3a7315db7 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -645,6 +645,7 @@ def edit_service_template(service_id, template_id): return render_template( "views/edit-{}-template.html".format(template["template_type"]), form=form, + errors=form.errors if form.errors else None, template=template, heading_action="Edit", ) diff --git a/app/templates/components/components/input/template.njk b/app/templates/components/components/input/template.njk index 7f5634651..f843f82b2 100644 --- a/app/templates/components/components/input/template.njk +++ b/app/templates/components/components/input/template.njk @@ -5,7 +5,7 @@ {#- a record of other elements that we need to associate with the input using aria-describedby – for example hints or error messages -#} {% set describedBy = params.describedBy if params.describedBy else "" %} -
+