From 5e98ec396efcc7ad6a0bf782d585e839deab6d6f Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Wed, 19 Jun 2024 13:59:39 -0700 Subject: [PATCH] made changes/fixes to tour flow --- app/assets/sass/uswds/_legacy-styles.scss | 4 +++ app/main/views/tour.py | 2 +- .../views/notifications/preview.html | 32 +++++++++++++------ 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/app/assets/sass/uswds/_legacy-styles.scss b/app/assets/sass/uswds/_legacy-styles.scss index 0f16e8861..bae05d457 100644 --- a/app/assets/sass/uswds/_legacy-styles.scss +++ b/app/assets/sass/uswds/_legacy-styles.scss @@ -66,6 +66,10 @@ h2.sms-message-header { margin-bottom: 0.5rem; } +.usa-prose >*+ h2.message-header { + margin-top: 1em; +} + h2.recipient-list { margin-bottom: 0.5rem; } diff --git a/app/main/views/tour.py b/app/main/views/tour.py index 3a93b7384..7e673c886 100644 --- a/app/main/views/tour.py +++ b/app/main/views/tour.py @@ -195,7 +195,7 @@ def check_tour_notification(service_id, template_id): ) return render_template( - "views/notifications/check.html", + "views/notifications/preview.html", template=template, back_link=back_link, help="2", diff --git a/app/templates/views/notifications/preview.html b/app/templates/views/notifications/preview.html index ce94a606f..df0951980 100644 --- a/app/templates/views/notifications/preview.html +++ b/app/templates/views/notifications/preview.html @@ -9,7 +9,11 @@ {% endblock %} {% block backLink %} - {{ usaBackLink({ "href": back_link_from_preview }) }} + {% if help %} + {{ usaBackLink({ "href": back_link }) }} + {% else %} + {{ usaBackLink({ "href": back_link_from_preview }) }} + {% endif %} {% endblock %} {% block maincolumn_content %} @@ -40,16 +44,26 @@ {% endcall %} {% else %} - {{ page_header('Preview') }} + {% if not help %} + {{ page_header('Preview') }} + {% endif %} + {% endif %} + {% if not help %} +
+

Scheduled: {{ scheduled_for |format_datetime_scheduled_notification if scheduled_for else 'Now'}}

+

Template: {{template.name}}

+

From: {{ template.sender }}

+

To: {{ recipient }}

+
{% endif %} -
-

Scheduled: {{ scheduled_for |format_datetime_scheduled_notification if scheduled_for else 'Now'}}

-

Template: {{template.name}}

-

From: {{ template.sender }}

-

To: {{ recipient }}

-
-

Message

+ {% if help %} +

Example text message

+ {% else %} +

Message

+ {% endif %} + +
{{ template|string }}