Skip to content

Commit

Permalink
Merge pull request #3445 from uktrade/develop
Browse files Browse the repository at this point in the history
Release PR
  • Loading branch information
davidu1975 authored Oct 2, 2024
2 parents cdfe963 + dec6f6b commit 63a3594
Show file tree
Hide file tree
Showing 268 changed files with 8,764 additions and 663 deletions.
5 changes: 5 additions & 0 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,11 @@
)
# Connect to the local dockerized Opensearch instance
elif OPENSEARCH_PROVIDER in ['localhost', 'aws']:
connections.create_connection(
alias='default',
hosts=[env.str('OPENSEARCH_URL', 'localhost:9200')],
connection_class=RequestsHttpConnection,
)
WAGTAILSEARCH_BACKENDS = {
'default': {
'BACKEND': 'wagtail.search.backends.elasticsearch7',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,43 @@ <h2 class="govuk-heading-s">Your commodity match</h2>
{% csrf_token %}
<div class="govuk-!-margin-bottom-6">
{% for field in form.visible_fields %}
<div class="govuk-form-group govuk-!-margin-bottom-7 {% if field.errors %}govuk-form-group--error{% endif %}">
<div class="govuk-checkboxes" data-module="govuk-checkboxes">
{% if field.name == 'not_sure_where_to_export' %}
<div class="govuk-form-group govuk-!-margin-top-3 govuk-!-margin-bottom-3 {% if field.errors %}govuk-form-group--error{% endif %}">
<div class="govuk-checkboxes__item govuk-!-margin-bottom-3 great-checkbox">
<input class="govuk-checkboxes__input" id="id_not_sure_where_to_export" name="not_sure_where_to_export" type="checkbox" value="{{ field.value }}" />
<label id="id_not_sure_where_to_export-label" for="id_not_sure_where_to_export" class="govuk-label govuk-checkboxes__label">{{ field.label }}</label>
</div>
</div>
{% elif field.name == 'market_not_listed' %}
<div class="govuk-form-group govuk-!-margin-bottom-3 {% if field.errors %}govuk-form-group--error{% endif %}">
<div class="govuk-checkboxes__item govuk-!-margin-bottom-3 great-checkbox">
<input class="govuk-checkboxes__input" id="id_market_not_listed" name="market_not_listed" type="checkbox" value="{{ field.value }}" data-aria-controls="conditional-unlisted-market" />
<label id="id_market_not_listed-label" for="id_market_not_listed" class="govuk-label govuk-checkboxes__label">{{ field.label }}</label>
</div>
</div>
{% elif field.name == 'market' %}
<div class="govuk-form-group govuk-!-margin-bottom-3 {% if field.errors %}govuk-form-group--error{% endif %}">
{% include 'domestic/contact/includes/govuk-form-field.html' with field=field %}
</div>
<div id="market-container"></div>
{% else %}
<div class="govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden" id="conditional-unlisted-market">
<div class="govuk-form-group govuk-!-margin-bottom-7 {% if field.errors %}govuk-form-group--error{% endif %}">
{% include 'domestic/contact/includes/govuk-form-field.html' with field=field hide_label=True %}
</div>
</div>
{% endif %}
</div>
{% endfor %}
<div id="market-container"></div>
</div>

<button type="submit" class="govuk-button great-min-width-250-desktop">{{ button_text }}</button>
</form>

<div>
<a href="{% url 'core:guided-journey-step-4' %}?is_market_skipped=True" class="govuk-link">Skip</a>
</div>
</form>
</div>
</div>
</div>
Expand All @@ -59,6 +87,8 @@ <h2 class="govuk-heading-s">Your commodity match</h2>

{% block body_js %}
{{ block.super }}
<script src="{% static 'javascript/govuk.js' %}"></script>
<script>window.GOVUKFrontend.initAll()</script>
<script type="text/javascript"
src="{% static 'javascript/accessible-autocomplete.v3.min.js' %}"></script>
<script type="text/javascript">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-full great-grid-column-seven-twelfths govuk-!-margin-bottom-5">
<h1 class="govuk-heading-xl govuk-!-margin-bottom-6">Export support for UK businesses</h1>

{% if session_data.sic_description %}
<div class="govuk-!-margin-bottom-6 govuk-!-padding-6 great-bg-white">
<h2 class="govuk-heading-s">What does your company make or do?</h2>
Expand All @@ -24,16 +24,20 @@ <h2 class="govuk-heading-s">Your commodity match</h2>
</div>
{% endif %}

{% if session_data.market %}
{% include 'domestic/contact/export-support/includes/market-widget.html' with market=session_data.market related_markets=related_markets %}
{% endif %}

{% if not session_data.market %}
{% if is_market_skipped or not session_data.market %}
<div class="govuk-!-margin-bottom-6 govuk-!-padding-6 great-bg-white">
{% include 'domestic/contact/export-support/includes/suggested-markets-widget.html' with suggested_markets=suggested_markets %}
</div>
{% endif %}

{% if not is_market_skipped and session_data.market %}
{% if is_restricted_market %}
{% include 'domestic/contact/export-support/includes/restricted-market-widget.html' %}
{% else %}
{% include 'domestic/contact/export-support/includes/market-widget.html' with market=session_data.market related_markets=related_markets %}
{% endif %}
{% endif %}

{% if session_data.sector %}
{% include 'domestic/contact/export-support/includes/sector-promo-widget.html' %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<a href="{% url 'core:guided-journey-step-3-edit' %}?return_to_step=4" class="govuk-link">(Change)</a>
</div>

<img src="/static/images/flags/{{ country_code | lower }}.svg" alt="{{ country_code | lower }} flag" width="50px" />

<a href="{{ market.get_full_url }}" class="govuk-heading-s govuk-!-margin-bottom-2 great-heading-link great-heading-link--no-chevron">
<h2 class="govuk-heading-s great-heading-link__heading">
Exporting guide to {{ market.heading }}</h2>
Expand Down Expand Up @@ -43,6 +45,7 @@ <h2 class="govuk-heading-s great-heading-link__heading">
{% endwith %}
{% endif %}
{% else %}
<img src="/static/images/flags/{{ country_code | lower }}.svg" alt="{{ country_code | lower }} flag" width="50px" />
<h2 class="govuk-heading-s">{{ market_name }}</h2>
<p class="govuk-body">Sorry we don't have any information</p>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="govuk-!-margin-top-5 govuk-!-margin-bottom-2 govuk-!-padding-6 great-bg-white">
<h2 class="govuk-heading-s great-heading-link__heading">{{ session_data.market }}</h2>
<p class="govuk-body">
If you want support for trading with {{ session_data.market }}
</p>
<a href="https://www.gov.uk/ask-export-support-team" class="govuk-link" target="_blank">Go to ESS enquiry form</a>
</div>
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{% load get_market_widget_data from component_tags %}

<h3 class="govuk-heading-xs govuk-!-margin-top-3 great-heading-link__heading">Suggested markets</h3>
{% for market in suggested_markets %}
{% for market, country_code in suggested_markets %}
{% with suggested_market_data=market|get_market_widget_data %}
<img src="/static/images/flags/{{ country_code | lower }}.svg" alt="{{ country_code | lower }} flag" width="50px" />
<a href="{{ suggested_market_data.get_full_url }}" class="govuk-!-margin-bottom-2 great-heading-link great-heading-link--no-chevron">
Exporting guide to {{ suggested_market_data.heading }}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load wagtailcore_tags %}
{% load wagtailimages_tags %}
{% load static %}
{% load add_govuk_classes url_type get_category_page_breadcrumbs from content_tags %}
{% load add_govuk_classes url_type get_category_page_breadcrumbs guided_journey_mode from content_tags %}
{% block head_title %}{{ page.page_title }}{% endblock %}
{% block meta_title %}{{ page.page_title }}{% endblock %}
{% block body_js %}
Expand Down Expand Up @@ -31,7 +31,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-4">{{ page.page_title }}</h1>
{% for child_page in page.get_children %}
{% with page=child_page.specific parent_page_title=page.page_title %}
<div class="govuk-!-margin-bottom-4 great-ds-border-bottom-grey">
<a href="{% pageurl page %}"
<a href="{% pageurl page %}{{ request.get_full_path | guided_journey_mode }}"
class="govuk-heading-xs govuk-!-margin-bottom-2 great-heading-link great-ds-heading-link" data-ga-digital-entry-point>
<h2 class="govuk-heading-xs great-heading-link__heading" data-title="{{page.page_title}}" data-category="{{parent_page_title}}" data-location="category page">
<span>{{ page.page_title }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% endblock %}
{% block body_attributes %}class="great-bg-white"{% endblock %}
{% block breadcrumbs_block %}
<div class="container">{% include 'breadcrumbs.html' with itemsList=page|get_sub_category_page_breadcrumbs homeURL=BREADCRUMBS_ROOT_URL collapseOnMobile=True %}</div>
<div class="container">{% include 'breadcrumbs.html' with itemsList=page|get_sub_category_page_breadcrumbs:request.get_full_path homeURL=BREADCRUMBS_ROOT_URL collapseOnMobile=True %}</div>
{% endblock %}
{% block content %}
<div class="govuk-!-padding-bottom-9 great great-bg-white">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% get_canonical_url as canonical_url %}
<link rel="canonical" href="{{ canonical_url }}">
{% get_hreflang_tags as hreflang_tags %}
{{ hreflang_tags|linebreaksbr }}
{{ hreflang_tags }}
{% endblock %}
{% block meta_title %}Account{% endblock %}
{% block step_title_container %}
Expand Down
13 changes: 13 additions & 0 deletions core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from captcha.widgets import ReCaptchaV3
from directory_forms_api_client.forms import GovNotifyEmailActionMixin
from django.forms import (
BooleanField,
CharField,
CheckboxSelectMultiple,
ChoiceField,
Expand Down Expand Up @@ -193,6 +194,18 @@ class GuidedJourneyStep3Form(forms.Form):
widget=TextInput(attrs={'class': 'govuk-input great-text-input', 'placeholder': 'Search...'}),
required=False,
)
not_sure_where_to_export = BooleanField(
label='Not sure where to export?',
required=False,
)
market_not_listed = BooleanField(
label="My market isn't listed",
required=False,
)
unlisted_market = CharField(
label='Unlisted market',
required=False,
)


class GuidedJourneyStep4Form(forms.Form):
Expand Down
Binary file modified core/geolocation_data/GeoLite2-City.mmdb
Binary file not shown.
Binary file modified core/geolocation_data/GeoLite2-Country.mmdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Generated by Django 4.2.14 on 2024-09-30 08:24

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('core', '0157_micrositepage_include_link_to_great_and_more'),
]

operations = [
migrations.RemoveField(
model_name='curatedlistpage',
name='country_tags',
),
migrations.RemoveField(
model_name='curatedlistpage',
name='sector_tags',
),
migrations.RemoveField(
model_name='curatedlistpage',
name='type_of_export_tags',
),
migrations.RemoveField(
model_name='topicpage',
name='country_tags',
),
migrations.RemoveField(
model_name='topicpage',
name='sector_tags',
),
migrations.RemoveField(
model_name='topicpage',
name='type_of_export_tags',
),
]
59 changes: 59 additions & 0 deletions core/migrations/0159_remove_regiontagged_content_type_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Generated by Django 4.2.14 on 2024-09-30 09:06

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('core', '0158_remove_curatedlistpage_country_tags_and_more'),
('domestic', '0065_remove_articlepage_type_of_export_tags_and_more'),
('export_academy', '0053_remove_coursepage_type_of_export_tags_and_more'),
]

operations = [
migrations.RemoveField(
model_name='regiontagged',
name='content_type',
),
migrations.RemoveField(
model_name='regiontagged',
name='tag',
),
migrations.RemoveField(
model_name='sectortagged',
name='content_type',
),
migrations.RemoveField(
model_name='sectortagged',
name='tag',
),
migrations.RemoveField(
model_name='typeofexporttagged',
name='content_type',
),
migrations.RemoveField(
model_name='typeofexporttagged',
name='tag',
),
migrations.RemoveField(
model_name='casestudy',
name='sector_tags',
),
migrations.RemoveField(
model_name='casestudy',
name='type_of_export_tags',
),
migrations.DeleteModel(
name='CountryTagged',
),
migrations.DeleteModel(
name='RegionTagged',
),
migrations.DeleteModel(
name='SectorTagged',
),
migrations.DeleteModel(
name='TypeOfExportTagged',
),
]
27 changes: 27 additions & 0 deletions core/migrations/0160_alter_herosnippet_slug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.2.15 on 2024-10-01 16:40

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0159_remove_regiontagged_content_type_and_more'),
]

operations = [
migrations.AlterField(
model_name='herosnippet',
name='slug',
field=models.CharField(
choices=[
('export-academy-listing-page-hero', 'Hero for the Export Academy listing page'),
('export-academy-registration-page-hero', 'Hero for the Export Academy registration page'),
],
help_text='Select the use-case for this snippet from a fixed list of choices',
max_length=255,
unique=True,
verbose_name='Purpose',
),
),
]
Loading

0 comments on commit 63a3594

Please sign in to comment.