diff --git a/config/settings.py b/config/settings.py index c34c36f4e1..0ec0fec335 100644 --- a/config/settings.py +++ b/config/settings.py @@ -157,6 +157,13 @@ / 'dist' / 'components' / 'notification-banner', + ROOT_DIR + / 'node_modules' + / '@uktrade' + / 'great-design-system' + / 'dist' + / 'components' + / 'notification-banner', ], 'APP_DIRS': True, 'OPTIONS': { diff --git a/contact/templates/domestic/contact/export-support/base.html b/contact/templates/domestic/contact/export-support/base.html index c61db27a3f..4604bc6069 100644 --- a/contact/templates/domestic/contact/export-support/base.html +++ b/contact/templates/domestic/contact/export-support/base.html @@ -40,14 +40,7 @@

{{ step_text }}

{% block content_top %}{% endblock %} {% if confirmation %} -
-
-

{{ heading_text }}

-
-
-

{{ strapline_text }}

-
-
+ {% include '_notification-banner.html' with type='success' titleText=heading_text text=strapline_text %} {% else %}

{{ heading_text }}

diff --git a/export_academy/templates/export_academy/booking_success.html b/export_academy/templates/export_academy/booking_success.html index 981483f765..4583a97ec5 100755 --- a/export_academy/templates/export_academy/booking_success.html +++ b/export_academy/templates/export_academy/booking_success.html @@ -19,66 +19,31 @@ {% endwith %} {% endblock %} -

-
-
-
-
+
-
{% include 'core/includes/hcsat.html' with hcsat_form=hcsat_form hcsat_stage=hcsat_form_stage%}
+
+ {% include 'core/includes/hcsat.html' with hcsat_form=hcsat_form hcsat_stage=hcsat_form_stage %} +
-
+ {% endblock content %} {% block feedback_reporter %} {% endblock feedback_reporter %} diff --git a/export_academy/templates/export_academy/includes/booking_success_content.html b/export_academy/templates/export_academy/includes/booking_success_content.html new file mode 100644 index 0000000000..9e74192023 --- /dev/null +++ b/export_academy/templates/export_academy/includes/booking_success_content.html @@ -0,0 +1,29 @@ +{% load event_list_buttons %} +{% if editing_registration %} +

+ Your registration details have been successfully updated. +

+{% else %} +

Event details:

+
+

{{ event.name }}

+
+

+ On {{ event.start_date|date:"D, j M" }} at {{ event.start_date|date:"g:iA"|lower }} +

+
+ +

+ We've emailed a + {% if booking.status == 'Confirmed' %} + booking + {% else %} + cancellation + {% endif %} + confirmation to {{ booking.registration.email }} +

+
+ {% if booking.status == 'Confirmed' %} + {% event_list_buttons event %} + {% endif %} +{% endif %} diff --git a/export_academy/views.py b/export_academy/views.py index b17ba8f1ad..fb1aeed30c 100644 --- a/export_academy/views.py +++ b/export_academy/views.py @@ -17,6 +17,7 @@ JsonResponse, ) from django.shortcuts import get_list_or_404, get_object_or_404, redirect +from django.template.loader import render_to_string from django.urls import reverse, reverse_lazy from django.utils.decorators import method_decorator from django.utils.text import get_valid_filename @@ -217,6 +218,17 @@ def get_context_data(self, **kwargs): if 'form' in kwargs: # pass back errors from form_invalid ctx['hcsat_form'] = kwargs['form'] + # Create notification context with all required variables + notification_context = { + 'editing_registration': ctx.get('editing_registration'), + 'event': ctx.get('event'), + 'booking': ctx.get('booking'), + 'heading_text': ctx.get('heading'), + 'text': render_to_string('export_academy/includes/booking_success_content.html', ctx, request=self.request), + } + + ctx.update(notification_context) # Update the context directly + return ctx def post(self, request, *args, **kwargs): diff --git a/international_online_offer/templates/eyb/about_your_business.html b/international_online_offer/templates/eyb/about_your_business.html index fecddacc8e..0512f10ce8 100644 --- a/international_online_offer/templates/eyb/about_your_business.html +++ b/international_online_offer/templates/eyb/about_your_business.html @@ -12,19 +12,7 @@ {% if request.GET.signup %}
- + {% include '_notification-banner.html' with type='success' titleText='Success' html='

Your email address has been confirmed

Keep your details safe in case you need to sign back in.

' %}
{% endif %} diff --git a/international_online_offer/templates/eyb/base.html b/international_online_offer/templates/eyb/base.html index b78e248530..adc344b296 100644 --- a/international_online_offer/templates/eyb/base.html +++ b/international_online_offer/templates/eyb/base.html @@ -19,19 +19,7 @@
- + {% include '_notification-banner.html' with type='success' titleText='Success' html='

You\'ve signed back in

Continue telling us about your business.

' %}
diff --git a/international_online_offer/templates/eyb/guide.html b/international_online_offer/templates/eyb/guide.html index 92240dd17f..043973d5d4 100644 --- a/international_online_offer/templates/eyb/guide.html +++ b/international_online_offer/templates/eyb/guide.html @@ -10,26 +10,16 @@ {% block content %}
{% if request.GET.signup %} -
-
- -
+
+
+ {% with notification_content=triage_data.sector|get_sector_display %} + {% url 'international_online_offer:change-your-answers' as change_url %} + {% with banner_html='

Here\'s your guide to expanding your business in the UK

We\'ve created your guide from everything you\'ve told us about your business in our '|add:notification_content|add:' sector. If anything changes, you can update your details

' %} + {% include '_notification-banner.html' with type='success' titleText='Success' html=banner_html %} + {% endwith %} + {% endwith %}
+
{% endif %}
diff --git a/international_online_offer/templates/eyb/includes/govuk/notification_banner.html b/international_online_offer/templates/eyb/includes/govuk/notification_banner.html deleted file mode 100644 index de2c2169fd..0000000000 --- a/international_online_offer/templates/eyb/includes/govuk/notification_banner.html +++ /dev/null @@ -1,19 +0,0 @@ -
- {% if banner_title %} -
-

{{ banner_title }}

-
- {% endif %} -
-

- {{ banner_heading }} - {% if banner_link and banner_link_text %} - {{ banner_link_text }}. - {% endif %} -

-
-