diff --git a/activitystream/serializers.py b/activitystream/serializers.py index d995ccf4e1..31ef207a5c 100644 --- a/activitystream/serializers.py +++ b/activitystream/serializers.py @@ -46,7 +46,7 @@ def to_representation(self, obj): class ArticlePageSerializer(serializers.Serializer): - expected_block_types = ['text', 'cta', 'image', 'Video', 'Columns', 'pull_quote'] + expected_block_types = ['text', 'cta', 'data_table', 'image', 'Video', 'Columns', 'pull_quote'] def _get_article_body_content_for_search(self, obj: ArticlePage) -> str: """Selectively extract streamfield data from the blocks in ArticlePage's article_body streamfield. diff --git a/config/url_redirects.py b/config/url_redirects.py index e67639b68c..3091c590e6 100644 --- a/config/url_redirects.py +++ b/config/url_redirects.py @@ -885,10 +885,6 @@ r'^finance/$|^advice/get-export-finance-and-funding/$', PermanentQuerystringRedirectView.as_view(url='https://www.ukexportfinance.gov.uk/'), ), - re_path( - r'^trade-finance/$', - PermanentQuerystringRedirectView.as_view(url='https://www.ukexportfinance.gov.uk/'), - ), re_path( r'^getting-paid/invoice-currency-and-contents/$|^getting-paid/payment-methods/$|^advice/manage-payment-for-export-orders/payment-methods-for-exporters/$', # noqa:E501 PermanentQuerystringRedirectView.as_view( diff --git a/core/js/largevideoupload/utils.js b/core/js/largevideoupload/utils.js index 26842e59a9..c8d4c602e3 100644 --- a/core/js/largevideoupload/utils.js +++ b/core/js/largevideoupload/utils.js @@ -29,13 +29,13 @@ export const createElement = (el, options = []) => { export const isFormValid = (file) => { const titleVal = document.querySelector('#id_title').value const fileNameLength = file.name.length - const transcriptVal = document.querySelector('#id_transcript').value + const englishSubtitlesVal = document.querySelector('#id_subtitles_en').value const isTitleValid = titleVal !== '' const isFileNameValid = fileNameLength <= 100 - const isTranscriptValid = transcriptVal !== '' + const isEnglishSubtitleValid = englishSubtitlesVal !== '' - const isValid = isTitleValid && isTranscriptValid && isFileNameValid + const isValid = isTitleValid && isFileNameValid && isEnglishSubtitleValid if (isValid) { document.querySelector('.messages').innerHTML = '' @@ -48,16 +48,16 @@ export const isFormValid = (file) => { field: 'title', errorMessage: ' This field is required.', }, - { - isValid: isTranscriptValid, - field: 'transcript', - errorMessage: ' This field is required.', - }, { isValid: isFileNameValid, field: 'file', errorMessage: ' Filename cannot exceed 100 characters.', }, + { + isValid: isEnglishSubtitleValid, + field: 'subtitles_en', + errorMessage: ' This field is required.', + }, ] fields.forEach(({ isValid, field, errorMessage }) => { diff --git a/core/js/largevideoupload/utils.test.js b/core/js/largevideoupload/utils.test.js index b29a6469aa..b37fa4a7bd 100644 --- a/core/js/largevideoupload/utils.test.js +++ b/core/js/largevideoupload/utils.test.js @@ -56,13 +56,13 @@ describe('Wagtail utils', () => { '
' + '
' + '
' + - '
' + + '
' + '' expect(isFormValid(mockFile)).toBe(false) document.querySelector('#id_title').value = 'test title' - document.querySelector('#id_transcript').value = 'test transcript' + document.querySelector('#id_subtitles_en').value = 'test english subtitles' expect(isFormValid(mockFile)).toBe(true) }) diff --git a/core/migrations/0129_alter_greatmedia_subtitles_en_and_more.py b/core/migrations/0129_alter_greatmedia_subtitles_en_and_more.py new file mode 100644 index 0000000000..a558a9962f --- /dev/null +++ b/core/migrations/0129_alter_greatmedia_subtitles_en_and_more.py @@ -0,0 +1,26 @@ +# Generated by Django 4.1.13 on 2024-01-11 11:56 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ('core', '0128_alter_sharesettings_hashtags'), + ] + + operations = [ + migrations.AlterField( + model_name='greatmedia', + name='subtitles_en', + field=models.TextField( + help_text='English-language subtitles for this video, in VTT format, Required for Level A WCAG compliance.', + null=True, + verbose_name='English subtitles', + ), + ), + migrations.AlterField( + model_name='greatmedia', + name='transcript', + field=models.TextField(blank=True, null=True, verbose_name='Transcript'), + ), + ] diff --git a/core/models.py b/core/models.py index 485f3ad7ab..1fb80f81a7 100644 --- a/core/models.py +++ b/core/models.py @@ -74,16 +74,14 @@ class GreatMedia(Media): verbose_name=_('Description'), blank=True, null=True # left null because was an existing field ) - transcript = models.TextField( - verbose_name=_('Transcript'), blank=False, null=True # left null because was an existing field - ) + transcript = models.TextField(verbose_name=_('Transcript'), blank=True, null=True) subtitles_en = models.TextField( verbose_name=_('English subtitles'), null=True, - blank=True, - help_text='English-language subtitles for this video, in VTT format', - ) + blank=False, + help_text='English-language subtitles for this video, in VTT format, Required for Level A WCAG compliance.', + ) # left null because was an existing field admin_form_fields = Media.admin_form_fields + ('transcript', 'subtitles_en', 'description') diff --git a/core/rich_text.py b/core/rich_text.py index 9287b0ff54..4eb2fa8aff 100644 --- a/core/rich_text.py +++ b/core/rich_text.py @@ -13,7 +13,7 @@ def render_a(attrs): - return format_html('', id=attrs['id']) + return format_html('', id=attrs['id']) class AnchorIdentifierLinkHandler(LinkHandler): diff --git a/core/sass/components/_sign-up.scss b/core/sass/components/_sign-up.scss index afe7452564..056bd76d1e 100644 --- a/core/sass/components/_sign-up.scss +++ b/core/sass/components/_sign-up.scss @@ -142,9 +142,9 @@ line-height: 34px; } - i { + span.great-icon { margin-right: 30px; - font-size: 1.5em; + font-size: 1.5em!important; } } } diff --git a/core/sass/exportplan/_sections.scss b/core/sass/exportplan/_sections.scss index d752f8b04a..2d3a06f65a 100644 --- a/core/sass/exportplan/_sections.scss +++ b/core/sass/exportplan/_sections.scss @@ -59,7 +59,7 @@ padding: 0; } -.hide-show-trigger:checked~div>label#hide-show-button>i { +.hide-show-trigger:checked~div>label#hide-show-button>span[role="img"] { transform: rotate(90deg); padding-right: 0; } diff --git a/core/sass/learn/_base.scss b/core/sass/learn/_base.scss index c706ec10d2..71032c95cd 100644 --- a/core/sass/learn/_base.scss +++ b/core/sass/learn/_base.scss @@ -592,7 +592,7 @@ $desktop: 1024px; } } - i { + span[role='img'] { margin-bottom: 0; @include tablet { diff --git a/core/templates/components/great/card.html b/core/templates/components/great/card.html index 453bcfaffb..1d21d73f18 100644 --- a/core/templates/components/great/card.html +++ b/core/templates/components/great/card.html @@ -1,5 +1,5 @@ {% load i18n wagtailimages_tags %} -{% load add_govuk_classes tag_text_mapper url_type from content_tags %} +{% load add_govuk_classes add_card_govuk_classes tag_text_mapper url_type from content_tags %}
{% if url %} @@ -35,11 +35,17 @@ {% if bypass_class_filter %}
{{ content }}
{% else %} - {% filter add_govuk_classes %} - <{{ content_tag|default:'div' }} - {% if tag %}class="govuk-!-margin-bottom-9"{% endif %} - >{{ content }} - {% endfilter %} + {% if tag %} + {% filter add_card_govuk_classes %} + <{{ content_tag|default:'div' }} + >{{ content }} + {% endfilter %} + {% else %} + {% filter add_govuk_classes %} + <{{ content_tag|default:'div' }} + >{{ content }} + {% endfilter %} + {% endif %} {% endif %} {% endif %} {% if tag and tag_icon %} diff --git a/core/templates/components/great/share.html b/core/templates/components/great/share.html index 99f31ecea6..54dde48881 100644 --- a/core/templates/components/great/share.html +++ b/core/templates/components/great/share.html @@ -1,7 +1,7 @@ {% if settings.core.ShareSettings.share_prefix and settings.core.ShareSettings.hashtags and settings.wagtailseo.SeoSettings.twitter_site %}
<{{ heading_level|default:'h2' }} class="govuk-heading-s">Share this page -
{% endif %} diff --git a/core/templates/core/header.html b/core/templates/core/header.html index ff252f937b..08c835aadf 100644 --- a/core/templates/core/header.html +++ b/core/templates/core/header.html @@ -28,18 +28,18 @@ {% path_match "^\/learn\/" as in_learning %}
  • Learn to export + class="govuk-!-padding-3 {% if in_learning %}active{% endif %}" + href="/learn/categories/">Learn to export
  • - {% endif %} + {% endif %} {% if request.user.is_authenticated %} {% path_match "^\/where-to-export\/" as in_targetmarkets %} {% if not features.FEATURE_DEA_V2 %} {% path_match "^\/learn\/" as in_learning %}
  • Learn to export + class="govuk-!-padding-3 {% if in_learning %}active{% endif %}" + href="/learn/categories/">Learn to export
  • {% endif %}
  • @@ -65,7 +65,9 @@ data-reveal-button data-reveal-modal aria-controls="guides-menu"> - Guides + Guides