diff --git a/cfgov/ask_cfpb/migrations/0008_add_footnotes.py b/cfgov/ask_cfpb/migrations/0008_add_footnotes.py new file mode 100644 index 00000000000..1984461c618 --- /dev/null +++ b/cfgov/ask_cfpb/migrations/0008_add_footnotes.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.11 on 2024-07-02 17:02 + +from django.db import migrations +import v1.blocks +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('ask_cfpb', '0007_move_tip_to_ask'), + ] + + operations = [ + migrations.AlterField( + model_name='answerpage', + name='answer_content', + field=wagtail.fields.StreamField([('text', wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(help_text="Add an optional anchor link tag to allow linking directly to this block. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'block-one-tag')", label='Anchor tag', required=False)), ('content', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'h2', 'h3', 'link', 'ol', 'ul', 'document-link', 'image', 'embed'], label='Text'))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('tip', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(features=['link', 'document-link'], label='Tip'))], label='Tip (floats right)')), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))])), ('how_to_schema', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(label='Title of How To section', max_length=500)), ('title_tag', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], help_text='Choose a tag for the title of the How To section.', label='Tag for How To section title')), ('show_title', wagtail.blocks.BooleanBlock(default=True, help_text='The How To schema requires a title to let search engines understand what it is about. If you do not want the title to be displayed in the page, uncheck this box and the title content will only be made available to crawlers and screen readers.', label='Show How To section title', required=False)), ('description', wagtail.blocks.RichTextBlock(blank=True, features=['ol', 'ul', 'bold', 'italic', 'link', 'document-link'], required=False)), ('step_title_tag', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('b', 'Bold'), ('p', 'Paragraph')], help_text='Choose a tag for the title of each HowTo step.', label='Tag for step titles')), ('has_numbers', wagtail.blocks.BooleanBlock(default=False, help_text='Check this box to display numbers before step titles. ', label='Show numbers for steps', required=False)), ('steps', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag to allow linking directly to this step. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'step-one-tag').", max_length=500, required=False)), ('title', wagtail.blocks.CharBlock(help_text='Enter a title for this HowTo step. You do not need to include a number in the title -- numbers will be added automatically in the template if the show numbers checkbox is checked.', max_length=500)), ('step_content', wagtail.blocks.StreamBlock([('text', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'h3', 'h4', 'link', 'ol', 'ul', 'document-link', 'image', 'embed'], label='Text'))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))]))]))])))], label='Google Schema - How To')), ('faq_schema', wagtail.blocks.StructBlock([('description', wagtail.blocks.RichTextBlock(blank=True, features=['ol', 'ul', 'bold', 'italic', 'link', 'document-link'], required=False)), ('questions', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag for this question. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'question-one-tag')", max_length=500, required=False)), ('question', wagtail.blocks.CharBlock(max_length=500)), ('answer_content', wagtail.blocks.StreamBlock([('text', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'h3', 'h4', 'link', 'ol', 'ul', 'document-link', 'image', 'embed'], label='Text'))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))]))]))])))], label='Google Schema - FAQ'))], blank=True, verbose_name='Answer'), + ), + ] diff --git a/cfgov/ask_cfpb/models/answer_page.py b/cfgov/ask_cfpb/models/answer_page.py index 17d5b333413..c07ad183378 100644 --- a/cfgov/ask_cfpb/models/answer_page.py +++ b/cfgov/ask_cfpb/models/answer_page.py @@ -7,6 +7,7 @@ from wagtail.admin.panels import ( FieldPanel, + InlinePanel, MultiFieldPanel, ObjectList, TabbedInterface, @@ -234,6 +235,7 @@ class AnswerPage(CFGOVPage): heading="Consumer Tools topics", classname="collapsible collapsed", ), + InlinePanel("footnotes", label="Footnotes"), ] sidebar = StreamField( diff --git a/cfgov/cfgov/settings/base.py b/cfgov/cfgov/settings/base.py index 8087150a8bb..0d146974afc 100644 --- a/cfgov/cfgov/settings/base.py +++ b/cfgov/cfgov/settings/base.py @@ -116,6 +116,7 @@ "wagtail_content_audit", "mozilla_django_oidc", "draftail_icons", + "wagtail_footnotes", ) MIDDLEWARE = ( @@ -289,7 +290,6 @@ TAGGIT_CASE_INSENSITIVE = True WAGTAIL_USER_CREATION_FORM = "login.forms.UserCreationForm" WAGTAIL_USER_EDIT_FORM = "login.forms.UserEditForm" - WAGTAILDOCS_SERVE_METHOD = "direct" # This is used for easy autocomplete search behavior in the Wagtail admin. @@ -299,6 +299,10 @@ } } +# This is the name of the template that will render a footnote citaiton +# inline in rich text. +WAGTAIL_FOOTNOTES_REFERENCE_TEMPLATE = "v1/includes/rich-text/footnote-reference.html" + # LEGACY APPS MAPBOX_ACCESS_TOKEN = os.environ.get("MAPBOX_ACCESS_TOKEN") diff --git a/cfgov/cfgov/urls.py b/cfgov/cfgov/urls.py index 0ffef3673de..80953afc54c 100644 --- a/cfgov/cfgov/urls.py +++ b/cfgov/cfgov/urls.py @@ -15,6 +15,7 @@ from flags.urls import flagged_re_path from flags.views import FlaggedTemplateView +from wagtail_footnotes import urls as footnotes_urls from wagtailautocomplete.urls.admin import ( urlpatterns as autocomplete_admin_urls, ) @@ -417,6 +418,8 @@ def empty_200_response(request, *args, **kwargs): path("documents/", include(wagtaildocs_urls)), # Health check re_path(r"^ht/", include("health_check.urls")), + # wagtail-footnotes + re_path(r"^footnotes/", include(footnotes_urls)), ] # Ask CFPB category and subcategory redirects diff --git a/cfgov/draftail_icons/static/draftail_icons/js/draftail_icons.js b/cfgov/draftail_icons/static/draftail_icons/js/draftail_icons.js index b4ca01f6847..9f8e6a322f2 100644 --- a/cfgov/draftail_icons/static/draftail_icons/js/draftail_icons.js +++ b/cfgov/draftail_icons/static/draftail_icons/js/draftail_icons.js @@ -1,6 +1,4 @@ -const React = window.React; - -class EntityIconSource extends React.Component { +class EntityIconSource extends window.React.Component { componentDidMount() { const { editorState, entityType, onComplete } = this.props; const icon_name = window.prompt("Icon identifier:"); @@ -54,7 +52,7 @@ const Icon = (props) => { // the editor. var icon_name = data["icon-name"]; var icon_url = `/static/icons/${icon_name}.svg`; - return React.createElement( + return window.React.createElement( 'img', { "src": icon_url, diff --git a/cfgov/filing_instruction_guide/migrations/0013_add_footnotes.py b/cfgov/filing_instruction_guide/migrations/0013_add_footnotes.py new file mode 100644 index 00000000000..ecc03f785d1 --- /dev/null +++ b/cfgov/filing_instruction_guide/migrations/0013_add_footnotes.py @@ -0,0 +1,29 @@ +# Generated by Django 4.2.11 on 2024-07-02 17:02 + +from django.db import migrations +import filing_instruction_guide.blocks +import v1.blocks +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('filing_instruction_guide', '0012_fig_notification'), + ] + + operations = [ + migrations.AlterField( + model_name='figcontentpage', + name='content', + field=wagtail.fields.StreamField([('Fig_Section', wagtail.blocks.StructBlock([('header', wagtail.blocks.TextBlock(label='Section header (h2)')), ('section_id', wagtail.blocks.TextBlock(help_text='Will be filled in automatically upon save.', required=False)), ('content', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))])), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('simple_chart', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=True)), ('subtitle', wagtail.blocks.TextBlock(required=False)), ('description', wagtail.blocks.TextBlock(help_text='Accessible description of the chart content', required=True)), ('figure_number', wagtail.blocks.CharBlock(required=False)), ('chart_type', wagtail.blocks.ChoiceBlock(choices=[('bar', 'Bar'), ('datetime', 'Date/time'), ('line', 'Line'), ('tilemap', 'Tile grid map')])), ('data_source', wagtail.blocks.TextBlock(help_text="URL of the chart's data source or an array of JSON data", required=True, rows=2)), ('data_series', wagtail.blocks.TextBlock(help_text='For charts pulling from a separate source file, include a list of the column headers (from a CSV file) or keys (from a JSON file) to include in the chart as ["HEADER/KEY1", "HEADER/KEY2"]. To change how the data is labeled in the chart, include the correct labels with the format [{"key": "HEADER/KEY1", "label": "NEWLABEL"}, {"key": "HEADER/KEY2", "label": "NEWLABEL2"}]', required=False)), ('show_all_series_by_default', wagtail.blocks.BooleanBlock(default=True, help_text='Uncheck this option to initially only show the first data series in the chart. Leave checked to show all data series by default. Users can always turn data series on or off by interacting with the chart legend. ', required=False)), ('x_axis_source', wagtail.blocks.TextBlock(help_text='The column header (CSV), key or data array (JSON) to include as the source of x-axis values.', required=False)), ('transform', wagtail.blocks.CharBlock(help_text="Name the javascript function in chart-hooks.js to run on the provided data before handing it to the chart. Can also provide '___'-separated arguments to this function which are passed in as arguments 2 to n", required=False)), ('x_axis_label', wagtail.blocks.CharBlock(required=False)), ('y_axis_label', wagtail.blocks.CharBlock(required=False)), ('filters', wagtail.blocks.TextBlock(help_text='If the chart needs the option for users to filter the data shown, for example by date or geographic region, provide the JSON objects to filter on, in the format {key: "KEY", "label": "LABEL"}', required=False)), ('style_overrides', wagtail.blocks.TextBlock(help_text='A JSON object with style overrides for the underlying Highcharts chart. No object merging is done, nested objects should be referenced with dot notation: {"tooltip.shape": "circle"}', required=False)), ('projected_months', wagtail.blocks.IntegerBlock(blank=True, help_text='A number to determine how many months of the data are projected values', max_value=12, min_value=0, null=True, required=False)), ('source_credits', wagtail.blocks.CharBlock(help_text='Attribution for the data source', required=False)), ('date_published', wagtail.blocks.CharBlock(help_text='When the underlying data was published', required=False)), ('download_text', wagtail.blocks.CharBlock(help_text='Custom text for the chart download field. Required to display a download link.', required=False)), ('download_file', wagtail.blocks.CharBlock(help_text='Location of a file to download, if different from the data source', required=False)), ('notes', wagtail.blocks.TextBlock(help_text='General chart information', required=False))])), ('expandable_group', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Added as an <h3> at the top of this block. Also adds a wrapping <div> whose id attribute comes from a slugified version of this heading, creating an anchor that can be used when linking to this part of the page.', required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('is_accordion', wagtail.blocks.BooleanBlock(required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of expandable group.', required=False)), ('is_faq', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add FAQ schema markup to expandables.', label='Uses FAQ schema', required=False)), ('expandables', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])))])), ('expandable', wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))])), ('raw_html_block', wagtail.blocks.RawHTMLBlock(label='Raw HTML block')), ('notification', wagtail.blocks.StructBlock([('type', wagtail.blocks.ChoiceBlock(choices=[('information', 'Information'), ('warning', 'Warning')])), ('message', wagtail.blocks.CharBlock(help_text='The main notification message to display.', required=True)), ('explanation', wagtail.blocks.TextBlock(help_text='Explanation text appears below the message in smaller type.', required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), help_text='Links appear on their own lines below the explanation.', required=False))])), ('faq_group', wagtail.blocks.StructBlock([('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of FAQ group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between FAQ items.', label='Show rule lines between items', required=False)), ('question_tag', wagtail.blocks.ChoiceBlock(choices=[('h2', 'h2'), ('h3', 'h3'), ('h4', 'h4'), ('p', 'p')], help_text='HTML tag for questions.')), ('faq_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag for this question. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'question-one-tag')", max_length=500, required=False)), ('question', wagtail.blocks.CharBlock(max_length=500)), ('answer', wagtail.blocks.StreamBlock([('full_width_text', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('content_with_anchor', wagtail.blocks.StructBlock([('content_block', wagtail.blocks.RichTextBlock()), ('anchor_link', wagtail.blocks.StructBlock([('link_id', wagtail.blocks.CharBlock(help_text='\n ID will be auto-generated on save.\n However, you may enter some human-friendly text that\n will be incorporated to make it easier to read.\n ', label='ID for this content block', required=False))]))])), ('content_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['anchor-identifier', 'h2', 'h3', 'h4', 'h5', 'hr', 'ol', 'ul', 'bold', 'italic', 'superscript', 'blockquote', 'link', 'document-link', 'image', 'icon', 'footnotes'])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('image', wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('image_width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full width'), (470, '470px'), (270, '270px'), (170, '170px')])), ('image_position', wagtail.blocks.ChoiceBlock(choices=[('right', 'right'), ('left', 'left')], help_text='Does not apply if the image is full-width')), ('text', wagtail.blocks.RichTextBlock(label='Caption', required=False)), ('is_bottom_rule', wagtail.blocks.BooleanBlock(default=True, help_text='Check to add a horizontal rule line to bottom of inset.', label='Has bottom rule line', required=False))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('quote', wagtail.blocks.StructBlock([('body', wagtail.blocks.TextBlock()), ('citation', wagtail.blocks.TextBlock(required=False))])), ('cta', wagtail.blocks.StructBlock([('slug_text', wagtail.blocks.CharBlock(required=False)), ('paragraph_text', wagtail.blocks.RichTextBlock(required=False)), ('button', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]))])), ('related_links', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(required=False)), ('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])))])), ('reusable_text', v1.blocks.ReusableTextChooserBlock('v1.ReusableText')), ('reusable_notification', v1.blocks.ReusableNotificationChooserBlock('v1.ReusableNotification')), ('email_signup', v1.blocks.EmailSignUpChooserBlock()), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))]))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))]))]), label='FAQ items'))])), ('data_points_block', filing_instruction_guide.blocks.FigDataPointsBlock())], block_counts={'data_points_block': {'max_num': 1}}, required=False))])), ('Fig_Subsection', wagtail.blocks.StructBlock([('header', wagtail.blocks.TextBlock(label='Subsection header (h3)')), ('section_id', wagtail.blocks.TextBlock(help_text='Will be filled in automatically upon save.', required=False)), ('content', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))])), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('simple_chart', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=True)), ('subtitle', wagtail.blocks.TextBlock(required=False)), ('description', wagtail.blocks.TextBlock(help_text='Accessible description of the chart content', required=True)), ('figure_number', wagtail.blocks.CharBlock(required=False)), ('chart_type', wagtail.blocks.ChoiceBlock(choices=[('bar', 'Bar'), ('datetime', 'Date/time'), ('line', 'Line'), ('tilemap', 'Tile grid map')])), ('data_source', wagtail.blocks.TextBlock(help_text="URL of the chart's data source or an array of JSON data", required=True, rows=2)), ('data_series', wagtail.blocks.TextBlock(help_text='For charts pulling from a separate source file, include a list of the column headers (from a CSV file) or keys (from a JSON file) to include in the chart as ["HEADER/KEY1", "HEADER/KEY2"]. To change how the data is labeled in the chart, include the correct labels with the format [{"key": "HEADER/KEY1", "label": "NEWLABEL"}, {"key": "HEADER/KEY2", "label": "NEWLABEL2"}]', required=False)), ('show_all_series_by_default', wagtail.blocks.BooleanBlock(default=True, help_text='Uncheck this option to initially only show the first data series in the chart. Leave checked to show all data series by default. Users can always turn data series on or off by interacting with the chart legend. ', required=False)), ('x_axis_source', wagtail.blocks.TextBlock(help_text='The column header (CSV), key or data array (JSON) to include as the source of x-axis values.', required=False)), ('transform', wagtail.blocks.CharBlock(help_text="Name the javascript function in chart-hooks.js to run on the provided data before handing it to the chart. Can also provide '___'-separated arguments to this function which are passed in as arguments 2 to n", required=False)), ('x_axis_label', wagtail.blocks.CharBlock(required=False)), ('y_axis_label', wagtail.blocks.CharBlock(required=False)), ('filters', wagtail.blocks.TextBlock(help_text='If the chart needs the option for users to filter the data shown, for example by date or geographic region, provide the JSON objects to filter on, in the format {key: "KEY", "label": "LABEL"}', required=False)), ('style_overrides', wagtail.blocks.TextBlock(help_text='A JSON object with style overrides for the underlying Highcharts chart. No object merging is done, nested objects should be referenced with dot notation: {"tooltip.shape": "circle"}', required=False)), ('projected_months', wagtail.blocks.IntegerBlock(blank=True, help_text='A number to determine how many months of the data are projected values', max_value=12, min_value=0, null=True, required=False)), ('source_credits', wagtail.blocks.CharBlock(help_text='Attribution for the data source', required=False)), ('date_published', wagtail.blocks.CharBlock(help_text='When the underlying data was published', required=False)), ('download_text', wagtail.blocks.CharBlock(help_text='Custom text for the chart download field. Required to display a download link.', required=False)), ('download_file', wagtail.blocks.CharBlock(help_text='Location of a file to download, if different from the data source', required=False)), ('notes', wagtail.blocks.TextBlock(help_text='General chart information', required=False))])), ('expandable_group', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Added as an <h3> at the top of this block. Also adds a wrapping <div> whose id attribute comes from a slugified version of this heading, creating an anchor that can be used when linking to this part of the page.', required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('is_accordion', wagtail.blocks.BooleanBlock(required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of expandable group.', required=False)), ('is_faq', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add FAQ schema markup to expandables.', label='Uses FAQ schema', required=False)), ('expandables', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])))])), ('expandable', wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))])), ('raw_html_block', wagtail.blocks.RawHTMLBlock(label='Raw HTML block')), ('notification', wagtail.blocks.StructBlock([('type', wagtail.blocks.ChoiceBlock(choices=[('information', 'Information'), ('warning', 'Warning')])), ('message', wagtail.blocks.CharBlock(help_text='The main notification message to display.', required=True)), ('explanation', wagtail.blocks.TextBlock(help_text='Explanation text appears below the message in smaller type.', required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), help_text='Links appear on their own lines below the explanation.', required=False))])), ('faq_group', wagtail.blocks.StructBlock([('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of FAQ group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between FAQ items.', label='Show rule lines between items', required=False)), ('question_tag', wagtail.blocks.ChoiceBlock(choices=[('h2', 'h2'), ('h3', 'h3'), ('h4', 'h4'), ('p', 'p')], help_text='HTML tag for questions.')), ('faq_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag for this question. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'question-one-tag')", max_length=500, required=False)), ('question', wagtail.blocks.CharBlock(max_length=500)), ('answer', wagtail.blocks.StreamBlock([('full_width_text', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('content_with_anchor', wagtail.blocks.StructBlock([('content_block', wagtail.blocks.RichTextBlock()), ('anchor_link', wagtail.blocks.StructBlock([('link_id', wagtail.blocks.CharBlock(help_text='\n ID will be auto-generated on save.\n However, you may enter some human-friendly text that\n will be incorporated to make it easier to read.\n ', label='ID for this content block', required=False))]))])), ('content_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['anchor-identifier', 'h2', 'h3', 'h4', 'h5', 'hr', 'ol', 'ul', 'bold', 'italic', 'superscript', 'blockquote', 'link', 'document-link', 'image', 'icon', 'footnotes'])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('image', wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('image_width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full width'), (470, '470px'), (270, '270px'), (170, '170px')])), ('image_position', wagtail.blocks.ChoiceBlock(choices=[('right', 'right'), ('left', 'left')], help_text='Does not apply if the image is full-width')), ('text', wagtail.blocks.RichTextBlock(label='Caption', required=False)), ('is_bottom_rule', wagtail.blocks.BooleanBlock(default=True, help_text='Check to add a horizontal rule line to bottom of inset.', label='Has bottom rule line', required=False))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('quote', wagtail.blocks.StructBlock([('body', wagtail.blocks.TextBlock()), ('citation', wagtail.blocks.TextBlock(required=False))])), ('cta', wagtail.blocks.StructBlock([('slug_text', wagtail.blocks.CharBlock(required=False)), ('paragraph_text', wagtail.blocks.RichTextBlock(required=False)), ('button', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]))])), ('related_links', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(required=False)), ('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])))])), ('reusable_text', v1.blocks.ReusableTextChooserBlock('v1.ReusableText')), ('reusable_notification', v1.blocks.ReusableNotificationChooserBlock('v1.ReusableNotification')), ('email_signup', v1.blocks.EmailSignUpChooserBlock()), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))]))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))]))]), label='FAQ items'))]))], required=False))])), ('Fig_Level_3_Subsection', wagtail.blocks.StructBlock([('header', wagtail.blocks.TextBlock(label='Level 3 subsection header (h4)')), ('section_id', wagtail.blocks.TextBlock(help_text='Will be filled in automatically upon save.', required=False)), ('content', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))])), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('simple_chart', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=True)), ('subtitle', wagtail.blocks.TextBlock(required=False)), ('description', wagtail.blocks.TextBlock(help_text='Accessible description of the chart content', required=True)), ('figure_number', wagtail.blocks.CharBlock(required=False)), ('chart_type', wagtail.blocks.ChoiceBlock(choices=[('bar', 'Bar'), ('datetime', 'Date/time'), ('line', 'Line'), ('tilemap', 'Tile grid map')])), ('data_source', wagtail.blocks.TextBlock(help_text="URL of the chart's data source or an array of JSON data", required=True, rows=2)), ('data_series', wagtail.blocks.TextBlock(help_text='For charts pulling from a separate source file, include a list of the column headers (from a CSV file) or keys (from a JSON file) to include in the chart as ["HEADER/KEY1", "HEADER/KEY2"]. To change how the data is labeled in the chart, include the correct labels with the format [{"key": "HEADER/KEY1", "label": "NEWLABEL"}, {"key": "HEADER/KEY2", "label": "NEWLABEL2"}]', required=False)), ('show_all_series_by_default', wagtail.blocks.BooleanBlock(default=True, help_text='Uncheck this option to initially only show the first data series in the chart. Leave checked to show all data series by default. Users can always turn data series on or off by interacting with the chart legend. ', required=False)), ('x_axis_source', wagtail.blocks.TextBlock(help_text='The column header (CSV), key or data array (JSON) to include as the source of x-axis values.', required=False)), ('transform', wagtail.blocks.CharBlock(help_text="Name the javascript function in chart-hooks.js to run on the provided data before handing it to the chart. Can also provide '___'-separated arguments to this function which are passed in as arguments 2 to n", required=False)), ('x_axis_label', wagtail.blocks.CharBlock(required=False)), ('y_axis_label', wagtail.blocks.CharBlock(required=False)), ('filters', wagtail.blocks.TextBlock(help_text='If the chart needs the option for users to filter the data shown, for example by date or geographic region, provide the JSON objects to filter on, in the format {key: "KEY", "label": "LABEL"}', required=False)), ('style_overrides', wagtail.blocks.TextBlock(help_text='A JSON object with style overrides for the underlying Highcharts chart. No object merging is done, nested objects should be referenced with dot notation: {"tooltip.shape": "circle"}', required=False)), ('projected_months', wagtail.blocks.IntegerBlock(blank=True, help_text='A number to determine how many months of the data are projected values', max_value=12, min_value=0, null=True, required=False)), ('source_credits', wagtail.blocks.CharBlock(help_text='Attribution for the data source', required=False)), ('date_published', wagtail.blocks.CharBlock(help_text='When the underlying data was published', required=False)), ('download_text', wagtail.blocks.CharBlock(help_text='Custom text for the chart download field. Required to display a download link.', required=False)), ('download_file', wagtail.blocks.CharBlock(help_text='Location of a file to download, if different from the data source', required=False)), ('notes', wagtail.blocks.TextBlock(help_text='General chart information', required=False))])), ('expandable_group', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Added as an <h3> at the top of this block. Also adds a wrapping <div> whose id attribute comes from a slugified version of this heading, creating an anchor that can be used when linking to this part of the page.', required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('is_accordion', wagtail.blocks.BooleanBlock(required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of expandable group.', required=False)), ('is_faq', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add FAQ schema markup to expandables.', label='Uses FAQ schema', required=False)), ('expandables', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])))])), ('expandable', wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))])), ('raw_html_block', wagtail.blocks.RawHTMLBlock(label='Raw HTML block')), ('notification', wagtail.blocks.StructBlock([('type', wagtail.blocks.ChoiceBlock(choices=[('information', 'Information'), ('warning', 'Warning')])), ('message', wagtail.blocks.CharBlock(help_text='The main notification message to display.', required=True)), ('explanation', wagtail.blocks.TextBlock(help_text='Explanation text appears below the message in smaller type.', required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), help_text='Links appear on their own lines below the explanation.', required=False))])), ('faq_group', wagtail.blocks.StructBlock([('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of FAQ group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between FAQ items.', label='Show rule lines between items', required=False)), ('question_tag', wagtail.blocks.ChoiceBlock(choices=[('h2', 'h2'), ('h3', 'h3'), ('h4', 'h4'), ('p', 'p')], help_text='HTML tag for questions.')), ('faq_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag for this question. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'question-one-tag')", max_length=500, required=False)), ('question', wagtail.blocks.CharBlock(max_length=500)), ('answer', wagtail.blocks.StreamBlock([('full_width_text', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('content_with_anchor', wagtail.blocks.StructBlock([('content_block', wagtail.blocks.RichTextBlock()), ('anchor_link', wagtail.blocks.StructBlock([('link_id', wagtail.blocks.CharBlock(help_text='\n ID will be auto-generated on save.\n However, you may enter some human-friendly text that\n will be incorporated to make it easier to read.\n ', label='ID for this content block', required=False))]))])), ('content_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['anchor-identifier', 'h2', 'h3', 'h4', 'h5', 'hr', 'ol', 'ul', 'bold', 'italic', 'superscript', 'blockquote', 'link', 'document-link', 'image', 'icon', 'footnotes'])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('image', wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('image_width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full width'), (470, '470px'), (270, '270px'), (170, '170px')])), ('image_position', wagtail.blocks.ChoiceBlock(choices=[('right', 'right'), ('left', 'left')], help_text='Does not apply if the image is full-width')), ('text', wagtail.blocks.RichTextBlock(label='Caption', required=False)), ('is_bottom_rule', wagtail.blocks.BooleanBlock(default=True, help_text='Check to add a horizontal rule line to bottom of inset.', label='Has bottom rule line', required=False))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('quote', wagtail.blocks.StructBlock([('body', wagtail.blocks.TextBlock()), ('citation', wagtail.blocks.TextBlock(required=False))])), ('cta', wagtail.blocks.StructBlock([('slug_text', wagtail.blocks.CharBlock(required=False)), ('paragraph_text', wagtail.blocks.RichTextBlock(required=False)), ('button', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]))])), ('related_links', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(required=False)), ('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])))])), ('reusable_text', v1.blocks.ReusableTextChooserBlock('v1.ReusableText')), ('reusable_notification', v1.blocks.ReusableNotificationChooserBlock('v1.ReusableNotification')), ('email_signup', v1.blocks.EmailSignUpChooserBlock()), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))]))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))]))]), label='FAQ items'))]))], required=False))]))]), + ), + migrations.AlterField( + model_name='figcontentpage', + name='top_content', + field=wagtail.fields.StreamField([('top_content', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))])), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('simple_chart', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=True)), ('subtitle', wagtail.blocks.TextBlock(required=False)), ('description', wagtail.blocks.TextBlock(help_text='Accessible description of the chart content', required=True)), ('figure_number', wagtail.blocks.CharBlock(required=False)), ('chart_type', wagtail.blocks.ChoiceBlock(choices=[('bar', 'Bar'), ('datetime', 'Date/time'), ('line', 'Line'), ('tilemap', 'Tile grid map')])), ('data_source', wagtail.blocks.TextBlock(help_text="URL of the chart's data source or an array of JSON data", required=True, rows=2)), ('data_series', wagtail.blocks.TextBlock(help_text='For charts pulling from a separate source file, include a list of the column headers (from a CSV file) or keys (from a JSON file) to include in the chart as ["HEADER/KEY1", "HEADER/KEY2"]. To change how the data is labeled in the chart, include the correct labels with the format [{"key": "HEADER/KEY1", "label": "NEWLABEL"}, {"key": "HEADER/KEY2", "label": "NEWLABEL2"}]', required=False)), ('show_all_series_by_default', wagtail.blocks.BooleanBlock(default=True, help_text='Uncheck this option to initially only show the first data series in the chart. Leave checked to show all data series by default. Users can always turn data series on or off by interacting with the chart legend. ', required=False)), ('x_axis_source', wagtail.blocks.TextBlock(help_text='The column header (CSV), key or data array (JSON) to include as the source of x-axis values.', required=False)), ('transform', wagtail.blocks.CharBlock(help_text="Name the javascript function in chart-hooks.js to run on the provided data before handing it to the chart. Can also provide '___'-separated arguments to this function which are passed in as arguments 2 to n", required=False)), ('x_axis_label', wagtail.blocks.CharBlock(required=False)), ('y_axis_label', wagtail.blocks.CharBlock(required=False)), ('filters', wagtail.blocks.TextBlock(help_text='If the chart needs the option for users to filter the data shown, for example by date or geographic region, provide the JSON objects to filter on, in the format {key: "KEY", "label": "LABEL"}', required=False)), ('style_overrides', wagtail.blocks.TextBlock(help_text='A JSON object with style overrides for the underlying Highcharts chart. No object merging is done, nested objects should be referenced with dot notation: {"tooltip.shape": "circle"}', required=False)), ('projected_months', wagtail.blocks.IntegerBlock(blank=True, help_text='A number to determine how many months of the data are projected values', max_value=12, min_value=0, null=True, required=False)), ('source_credits', wagtail.blocks.CharBlock(help_text='Attribution for the data source', required=False)), ('date_published', wagtail.blocks.CharBlock(help_text='When the underlying data was published', required=False)), ('download_text', wagtail.blocks.CharBlock(help_text='Custom text for the chart download field. Required to display a download link.', required=False)), ('download_file', wagtail.blocks.CharBlock(help_text='Location of a file to download, if different from the data source', required=False)), ('notes', wagtail.blocks.TextBlock(help_text='General chart information', required=False))])), ('expandable_group', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Added as an <h3> at the top of this block. Also adds a wrapping <div> whose id attribute comes from a slugified version of this heading, creating an anchor that can be used when linking to this part of the page.', required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('is_accordion', wagtail.blocks.BooleanBlock(required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of expandable group.', required=False)), ('is_faq', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add FAQ schema markup to expandables.', label='Uses FAQ schema', required=False)), ('expandables', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])))])), ('expandable', wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))])), ('raw_html_block', wagtail.blocks.RawHTMLBlock(label='Raw HTML block')), ('notification', wagtail.blocks.StructBlock([('type', wagtail.blocks.ChoiceBlock(choices=[('information', 'Information'), ('warning', 'Warning')])), ('message', wagtail.blocks.CharBlock(help_text='The main notification message to display.', required=True)), ('explanation', wagtail.blocks.TextBlock(help_text='Explanation text appears below the message in smaller type.', required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), help_text='Links appear on their own lines below the explanation.', required=False))])), ('faq_group', wagtail.blocks.StructBlock([('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of FAQ group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between FAQ items.', label='Show rule lines between items', required=False)), ('question_tag', wagtail.blocks.ChoiceBlock(choices=[('h2', 'h2'), ('h3', 'h3'), ('h4', 'h4'), ('p', 'p')], help_text='HTML tag for questions.')), ('faq_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag for this question. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'question-one-tag')", max_length=500, required=False)), ('question', wagtail.blocks.CharBlock(max_length=500)), ('answer', wagtail.blocks.StreamBlock([('full_width_text', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('content_with_anchor', wagtail.blocks.StructBlock([('content_block', wagtail.blocks.RichTextBlock()), ('anchor_link', wagtail.blocks.StructBlock([('link_id', wagtail.blocks.CharBlock(help_text='\n ID will be auto-generated on save.\n However, you may enter some human-friendly text that\n will be incorporated to make it easier to read.\n ', label='ID for this content block', required=False))]))])), ('content_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['anchor-identifier', 'h2', 'h3', 'h4', 'h5', 'hr', 'ol', 'ul', 'bold', 'italic', 'superscript', 'blockquote', 'link', 'document-link', 'image', 'icon', 'footnotes'])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('image', wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('image_width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full width'), (470, '470px'), (270, '270px'), (170, '170px')])), ('image_position', wagtail.blocks.ChoiceBlock(choices=[('right', 'right'), ('left', 'left')], help_text='Does not apply if the image is full-width')), ('text', wagtail.blocks.RichTextBlock(label='Caption', required=False)), ('is_bottom_rule', wagtail.blocks.BooleanBlock(default=True, help_text='Check to add a horizontal rule line to bottom of inset.', label='Has bottom rule line', required=False))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('quote', wagtail.blocks.StructBlock([('body', wagtail.blocks.TextBlock()), ('citation', wagtail.blocks.TextBlock(required=False))])), ('cta', wagtail.blocks.StructBlock([('slug_text', wagtail.blocks.CharBlock(required=False)), ('paragraph_text', wagtail.blocks.RichTextBlock(required=False)), ('button', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]))])), ('related_links', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(required=False)), ('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])))])), ('reusable_text', v1.blocks.ReusableTextChooserBlock('v1.ReusableText')), ('reusable_notification', v1.blocks.ReusableNotificationChooserBlock('v1.ReusableNotification')), ('email_signup', v1.blocks.EmailSignUpChooserBlock()), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))]))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))]))]), label='FAQ items'))]))], help_text='Content that will appear above the first FIG section', required=False))], blank=True), + ), + ] diff --git a/cfgov/form_explainer/migrations/0010_add_footnotes.py b/cfgov/form_explainer/migrations/0010_add_footnotes.py new file mode 100644 index 00000000000..fc1cbf0503c --- /dev/null +++ b/cfgov/form_explainer/migrations/0010_add_footnotes.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.11 on 2024-07-02 17:02 + +from django.db import migrations +import v1.blocks +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('form_explainer', '0009_add_reusable_notification'), + ] + + operations = [ + migrations.AlterField( + model_name='formexplainerpage', + name='content', + field=wagtail.fields.StreamField([('explainer', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], label='Heading (optional)', required=False)), ('pages', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(icon='image', required=True)), ('categories', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Optional. Leave blank if there is only one type of note for this image.', label='Category title', required=False)), ('notes', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(label='Expandable header', required=True)), ('body', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], label='Expandable text', required=True)), ('coordinates', wagtail.blocks.StructBlock([('left', wagtail.blocks.FloatBlock(label='X value (in percentage)', max_value=100, min_value=0, required=True)), ('top', wagtail.blocks.FloatBlock(label='Y value (in percentage)', max_value=100, min_value=0, required=True)), ('width', wagtail.blocks.FloatBlock(label='Width (in percentage)', max_value=100, min_value=0, required=True)), ('height', wagtail.blocks.FloatBlock(label='Height (in percentage)', max_value=100, min_value=0, required=True))], form_classname='coordinates', help_text='Enter percentage values for the highlighted area of the image associated with this expandable. See Hubcap documentation for more information on identifying coordinates.', label='Image coordinates'))], form_classname='explainer_notes', required=False), default=[]))], required=False)))], required=False)))])), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))])), ('full_width_text', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('content_with_anchor', wagtail.blocks.StructBlock([('content_block', wagtail.blocks.RichTextBlock()), ('anchor_link', wagtail.blocks.StructBlock([('link_id', wagtail.blocks.CharBlock(help_text='\n ID will be auto-generated on save.\n However, you may enter some human-friendly text that\n will be incorporated to make it easier to read.\n ', label='ID for this content block', required=False))]))])), ('content_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['anchor-identifier', 'h2', 'h3', 'h4', 'h5', 'hr', 'ol', 'ul', 'bold', 'italic', 'superscript', 'blockquote', 'link', 'document-link', 'image', 'icon', 'footnotes'])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('image', wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('image_width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full width'), (470, '470px'), (270, '270px'), (170, '170px')])), ('image_position', wagtail.blocks.ChoiceBlock(choices=[('right', 'right'), ('left', 'left')], help_text='Does not apply if the image is full-width')), ('text', wagtail.blocks.RichTextBlock(label='Caption', required=False)), ('is_bottom_rule', wagtail.blocks.BooleanBlock(default=True, help_text='Check to add a horizontal rule line to bottom of inset.', label='Has bottom rule line', required=False))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('quote', wagtail.blocks.StructBlock([('body', wagtail.blocks.TextBlock()), ('citation', wagtail.blocks.TextBlock(required=False))])), ('cta', wagtail.blocks.StructBlock([('slug_text', wagtail.blocks.CharBlock(required=False)), ('paragraph_text', wagtail.blocks.RichTextBlock(required=False)), ('button', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]))])), ('related_links', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(required=False)), ('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])))])), ('reusable_text', v1.blocks.ReusableTextChooserBlock('v1.ReusableText')), ('reusable_notification', v1.blocks.ReusableNotificationChooserBlock('v1.ReusableNotification')), ('email_signup', v1.blocks.EmailSignUpChooserBlock()), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))]))]))]), + ), + ] diff --git a/cfgov/paying_for_college/migrations/0012_add_footnotes.py b/cfgov/paying_for_college/migrations/0012_add_footnotes.py new file mode 100644 index 00000000000..631ba0a3283 --- /dev/null +++ b/cfgov/paying_for_college/migrations/0012_add_footnotes.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.11 on 2024-07-02 17:02 + +from django.db import migrations +import v1.blocks +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('paying_for_college', '0011_remove_is_larger_heading'), + ] + + operations = [ + migrations.AlterField( + model_name='collegecostspage', + name='content', + field=wagtail.fields.StreamField([('full_width_text', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('content_with_anchor', wagtail.blocks.StructBlock([('content_block', wagtail.blocks.RichTextBlock()), ('anchor_link', wagtail.blocks.StructBlock([('link_id', wagtail.blocks.CharBlock(help_text='\n ID will be auto-generated on save.\n However, you may enter some human-friendly text that\n will be incorporated to make it easier to read.\n ', label='ID for this content block', required=False))]))])), ('content_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['anchor-identifier', 'h2', 'h3', 'h4', 'h5', 'hr', 'ol', 'ul', 'bold', 'italic', 'superscript', 'blockquote', 'link', 'document-link', 'image', 'icon', 'footnotes'])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('image', wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('image_width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full width'), (470, '470px'), (270, '270px'), (170, '170px')])), ('image_position', wagtail.blocks.ChoiceBlock(choices=[('right', 'right'), ('left', 'left')], help_text='Does not apply if the image is full-width')), ('text', wagtail.blocks.RichTextBlock(label='Caption', required=False)), ('is_bottom_rule', wagtail.blocks.BooleanBlock(default=True, help_text='Check to add a horizontal rule line to bottom of inset.', label='Has bottom rule line', required=False))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('quote', wagtail.blocks.StructBlock([('body', wagtail.blocks.TextBlock()), ('citation', wagtail.blocks.TextBlock(required=False))])), ('cta', wagtail.blocks.StructBlock([('slug_text', wagtail.blocks.CharBlock(required=False)), ('paragraph_text', wagtail.blocks.RichTextBlock(required=False)), ('button', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]))])), ('related_links', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(required=False)), ('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])))])), ('reusable_text', v1.blocks.ReusableTextChooserBlock('v1.ReusableText')), ('reusable_notification', v1.blocks.ReusableNotificationChooserBlock('v1.ReusableNotification')), ('email_signup', v1.blocks.EmailSignUpChooserBlock()), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))]))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))])), ('expandable_group', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Added as an <h3> at the top of this block. Also adds a wrapping <div> whose id attribute comes from a slugified version of this heading, creating an anchor that can be used when linking to this part of the page.', required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('is_accordion', wagtail.blocks.BooleanBlock(required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of expandable group.', required=False)), ('is_faq', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add FAQ schema markup to expandables.', label='Uses FAQ schema', required=False)), ('expandables', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])))])), ('expandable', wagtail.blocks.StructBlock([('label', wagtail.blocks.CharBlock(required=False)), ('icon', wagtail.blocks.CharBlock(required=False)), ('is_bordered', wagtail.blocks.BooleanBlock(required=False)), ('is_midtone', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded', wagtail.blocks.BooleanBlock(required=False)), ('is_expanded_padding', wagtail.blocks.BooleanBlock(required=False)), ('content', wagtail.blocks.StreamBlock([('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('links', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])), ('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))]))], blank=True))])), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('raw_html_block', wagtail.blocks.RawHTMLBlock(label='Raw HTML block'))], blank=True), + ), + ] diff --git a/cfgov/regulations3k/migrations/0011_add_footnotes.py b/cfgov/regulations3k/migrations/0011_add_footnotes.py new file mode 100644 index 00000000000..25e4939c326 --- /dev/null +++ b/cfgov/regulations3k/migrations/0011_add_footnotes.py @@ -0,0 +1,28 @@ +# Generated by Django 4.2.11 on 2024-07-02 17:02 + +from django.db import migrations +import v1.blocks +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('regulations3k', '0010_add_reusable_notification'), + ] + + operations = [ + migrations.AlterField( + model_name='regulationlandingpage', + name='content', + field=wagtail.fields.StreamField([('notification', wagtail.blocks.StructBlock([('type', wagtail.blocks.ChoiceBlock(choices=[('information', 'Information'), ('warning', 'Warning')])), ('message', wagtail.blocks.CharBlock(help_text='The main notification message to display.', required=True)), ('explanation', wagtail.blocks.TextBlock(help_text='Explanation text appears below the message in smaller type.', required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), help_text='Links appear on their own lines below the explanation.', required=False))])), ('full_width_text', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('content_with_anchor', wagtail.blocks.StructBlock([('content_block', wagtail.blocks.RichTextBlock()), ('anchor_link', wagtail.blocks.StructBlock([('link_id', wagtail.blocks.CharBlock(help_text='\n ID will be auto-generated on save.\n However, you may enter some human-friendly text that\n will be incorporated to make it easier to read.\n ', label='ID for this content block', required=False))]))])), ('content_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['anchor-identifier', 'h2', 'h3', 'h4', 'h5', 'hr', 'ol', 'ul', 'bold', 'italic', 'superscript', 'blockquote', 'link', 'document-link', 'image', 'icon', 'footnotes'])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('image', wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('image_width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full width'), (470, '470px'), (270, '270px'), (170, '170px')])), ('image_position', wagtail.blocks.ChoiceBlock(choices=[('right', 'right'), ('left', 'left')], help_text='Does not apply if the image is full-width')), ('text', wagtail.blocks.RichTextBlock(label='Caption', required=False)), ('is_bottom_rule', wagtail.blocks.BooleanBlock(default=True, help_text='Check to add a horizontal rule line to bottom of inset.', label='Has bottom rule line', required=False))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('quote', wagtail.blocks.StructBlock([('body', wagtail.blocks.TextBlock()), ('citation', wagtail.blocks.TextBlock(required=False))])), ('cta', wagtail.blocks.StructBlock([('slug_text', wagtail.blocks.CharBlock(required=False)), ('paragraph_text', wagtail.blocks.RichTextBlock(required=False)), ('button', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]))])), ('related_links', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(required=False)), ('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])))])), ('reusable_text', v1.blocks.ReusableTextChooserBlock('v1.ReusableText')), ('reusable_notification', v1.blocks.ReusableNotificationChooserBlock('v1.ReusableNotification')), ('email_signup', v1.blocks.EmailSignUpChooserBlock()), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))])), ('regulations_list', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Regulations list heading', required=False)), ('more_regs_page', wagtail.blocks.PageChooserBlock(help_text='Link to more regulations')), ('more_regs_text', wagtail.blocks.CharBlock(help_text='Text to show on link to more regulations', required=False))]))]))], blank=True), + ), + migrations.AlterField( + model_name='regulationpage', + name='content', + field=wagtail.fields.StreamField([('info_unit_group', wagtail.blocks.StructBlock([('format', wagtail.blocks.ChoiceBlock(choices=[('50-50', '50/50'), ('33-33-33', '33/33/33'), ('25-75', '25/75')], help_text='Choose the number and width of info unit columns.', label='Format')), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('intro', wagtail.blocks.RichTextBlock(required=False)), ('link_image_and_heading', wagtail.blocks.BooleanBlock(default=True, help_text="Check this to link all images and headings to the URL of the first link in their unit's list, if there is a link.", required=False)), ('has_top_rule_line', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of info unit group.', required=False)), ('lines_between_items', wagtail.blocks.BooleanBlock(default=False, help_text='Check this to show horizontal rule lines between info units.', label='Show rule lines between items', required=False)), ('border_radius_image', wagtail.blocks.ChoiceBlock(choices=[('none', 'None'), ('rounded', 'Rounded corners'), ('circle', 'Circle')], help_text='Adds a border-radius class to images in this group, allowing for a rounded or circular border.', label='Border radius for images?', required=False)), ('info_units', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], default={'level': 'h3'}, required=False)), ('body', wagtail.blocks.RichTextBlock(blank=True, required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]), required=False))]), default=[]))])), ('full_width_text', wagtail.blocks.StreamBlock([('content', wagtail.blocks.RichTextBlock(icon='edit')), ('content_with_anchor', wagtail.blocks.StructBlock([('content_block', wagtail.blocks.RichTextBlock()), ('anchor_link', wagtail.blocks.StructBlock([('link_id', wagtail.blocks.CharBlock(help_text='\n ID will be auto-generated on save.\n However, you may enter some human-friendly text that\n will be incorporated to make it easier to read.\n ', label='ID for this content block', required=False))]))])), ('content_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['anchor-identifier', 'h2', 'h3', 'h4', 'h5', 'hr', 'ol', 'ul', 'bold', 'italic', 'superscript', 'blockquote', 'link', 'document-link', 'image', 'icon', 'footnotes'])), ('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('image', wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('upload', wagtail.images.blocks.ImageChooserBlock(required=False)), ('alt', wagtail.blocks.CharBlock(help_text="No character limit, but be as succinct as possible. If the image is decorative (i.e., a screenreader wouldn't have anything useful to say about it), leave this field blank.", required=False))])), ('image_width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full width'), (470, '470px'), (270, '270px'), (170, '170px')])), ('image_position', wagtail.blocks.ChoiceBlock(choices=[('right', 'right'), ('left', 'left')], help_text='Does not apply if the image is full-width')), ('text', wagtail.blocks.RichTextBlock(label='Caption', required=False)), ('is_bottom_rule', wagtail.blocks.BooleanBlock(default=True, help_text='Check to add a horizontal rule line to bottom of inset.', label='Has bottom rule line', required=False))])), ('table', wagtail.blocks.StructBlock([('heading', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('level', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('h5', 'H5')])), ('icon', wagtail.blocks.CharBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. See full list of icons', required=False))], required=False)), ('text_introduction', wagtail.blocks.CharBlock(required=False)), ('options', wagtail.blocks.MultipleChoiceBlock(choices=[('is_full_width', 'Display the table at full width'), ('stack_on_mobile', 'Stack the table columns on mobile')], required=False)), ('data', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('text', wagtail.blocks.CharBlock()), ('numeric', wagtail.blocks.FloatBlock()), ('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript'])), ('rich_text_with_footnotes', v1.blocks.RichTextBlockWithFootnotes(features=['bold', 'italic', 'ol', 'ul', 'link', 'document-link', 'superscript', 'footnotes']))]))])), ('quote', wagtail.blocks.StructBlock([('body', wagtail.blocks.TextBlock()), ('citation', wagtail.blocks.TextBlock(required=False))])), ('cta', wagtail.blocks.StructBlock([('slug_text', wagtail.blocks.CharBlock(required=False)), ('paragraph_text', wagtail.blocks.RichTextBlock(required=False)), ('button', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))]))])), ('related_links', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(required=False)), ('paragraph', wagtail.blocks.RichTextBlock(required=False)), ('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(required=False)), ('aria_label', wagtail.blocks.CharBlock(help_text='Add an ARIA label if the link text does not describe the destination of the link (e.g. has ambiguous text like "Learn more" that is not descriptive on its own).', required=False)), ('url', wagtail.blocks.CharBlock(default='/', required=False)), ('is_link_boldface', wagtail.blocks.BooleanBlock(default=False, required=False))])))])), ('reusable_text', v1.blocks.ReusableTextChooserBlock('v1.ReusableText')), ('reusable_notification', v1.blocks.ReusableNotificationChooserBlock('v1.ReusableNotification')), ('email_signup', v1.blocks.EmailSignUpChooserBlock()), ('well', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(label='Well', required=False))]))]))], blank=True, null=True), + ), + ] diff --git a/cfgov/unprocessed/css/footnotes.less b/cfgov/unprocessed/css/footnotes.less new file mode 100644 index 00000000000..343b254d75a --- /dev/null +++ b/cfgov/unprocessed/css/footnotes.less @@ -0,0 +1,3 @@ +.m-footnotes p:last-of-type { + display: inline; +} diff --git a/cfgov/unprocessed/css/main.less b/cfgov/unprocessed/css/main.less index 1deacd51148..9b52ffb4b25 100644 --- a/cfgov/unprocessed/css/main.less +++ b/cfgov/unprocessed/css/main.less @@ -97,6 +97,7 @@ @import (less) 'skip-nav.less'; @import (less) 'breadcrumbs.less'; +@import (less) 'footnotes.less'; /* Print styles ========================================================================== */ diff --git a/cfgov/v1/atomic_elements/organisms.py b/cfgov/v1/atomic_elements/organisms.py index f7d726a2dd7..b8611c9b671 100644 --- a/cfgov/v1/atomic_elements/organisms.py +++ b/cfgov/v1/atomic_elements/organisms.py @@ -1,6 +1,7 @@ from urllib.parse import urlencode from django.apps import apps +from django.conf import settings from django.core.exceptions import ValidationError from django.db.models import Q from django.utils.safestring import mark_safe @@ -23,6 +24,7 @@ ContactUsTable, Table, ) +from v1.blocks import RichTextBlockWithFootnotes from v1.util import ref @@ -526,6 +528,12 @@ class Media: class FullWidthText(blocks.StreamBlock): content = blocks.RichTextBlock(icon="edit") content_with_anchor = molecules.ContentWithAnchor() + content_with_footnotes = RichTextBlockWithFootnotes( + features=settings.WAGTAILADMIN_RICH_TEXT_EDITORS["default"]["OPTIONS"][ + "features" + ] + ) + heading = v1_blocks.HeadingBlock(required=False) image = molecules.ContentImage() table = Table() diff --git a/cfgov/v1/atomic_elements/tables.py b/cfgov/v1/atomic_elements/tables.py index f68eb688145..e831db2b849 100644 --- a/cfgov/v1/atomic_elements/tables.py +++ b/cfgov/v1/atomic_elements/tables.py @@ -7,7 +7,7 @@ from wagtail.documents.blocks import DocumentChooserBlock from wagtail.telepath import register -from v1.blocks import HeadingBlock +from v1.blocks import HeadingBlock, RichTextBlockWithFootnotes class ContactUsRow(blocks.StructBlock): @@ -96,6 +96,20 @@ class Table(blocks.StructBlock): ] ), ), + ( + "rich_text_with_footnotes", + RichTextBlockWithFootnotes( + features=[ + "bold", + "italic", + "ol", + "ul", + "link", + "document-link", + "superscript", + ] + ), + ), ] ) diff --git a/cfgov/v1/blocks.py b/cfgov/v1/blocks.py index 8e80b2ee10a..31a742de7c7 100644 --- a/cfgov/v1/blocks.py +++ b/cfgov/v1/blocks.py @@ -1,9 +1,20 @@ +from django.conf import settings +from django.core.exceptions import ValidationError +from django.template.loader import get_template from django.utils.safestring import mark_safe from django.utils.text import slugify from wagtail import blocks +from wagtail.models import Page from wagtail.snippets.blocks import SnippetChooserBlock +from wagtail_footnotes.blocks import ( + FIND_FOOTNOTE_TAG, +) +from wagtail_footnotes.blocks import ( + RichTextBlockWithFootnotes as WagtailFootnotesRichTextBlockWithFootnotes, +) + from v1.util.util import get_unique_id @@ -85,3 +96,49 @@ class Meta: class Media: js = ["email-signup.js"] + + +class RichTextBlockWithFootnotes(WagtailFootnotesRichTextBlockWithFootnotes): + def render_footnote_tag(self, index): + template = get_template(settings.WAGTAIL_FOOTNOTES_REFERENCE_TEMPLATE) + return template.render({"index": index}) + + def replace_footnote_tags(self, value, html, context=None): + # This is a wholesale copy of the replace_footnote_tags() method in + # wagtail-footnotes's RichTextBlockWithFootnotes. It modifies the + # embedded replace_tag() function to call our own + # render_footnote_tag() method. This is a change that should be + # contributed back upstream to allow straight-forward modification of + # footnote link rendering. + # + # There is an alternative implementation proposed in a PR in 2022: + # https://github.com/torchbox/wagtail-footnotes/pull/27 + # But I think I prefer providing a new method to a new embedded func. + if context is None: + new_context = self.get_context(value) + else: + new_context = self.get_context(value, parent_context=dict(context)) + + if not isinstance(new_context.get("page"), Page): + return html + + page = new_context["page"] + if not hasattr(page, "footnotes_list"): + page.footnotes_list = [] + self.footnotes = { + str(footnote.uuid): footnote for footnote in page.footnotes.all() + } + + def replace_tag(match): + try: + index = self.process_footnote(match.group(1), page) + except (KeyError, ValidationError): # pragma: no cover + return "" + else: + # This line is the only change to wagtail-footnote's + # replace_footnote_tags(), providing a separate method that + # can be overriden for rendering the footnote reference link. + return self.render_footnote_tag(index) + + # note: we return safe html + return mark_safe(FIND_FOOTNOTE_TAG.sub(replace_tag, html)) # noqa: S308 diff --git a/cfgov/v1/jinja2/v1/includes/molecules/footnotes.html b/cfgov/v1/jinja2/v1/includes/molecules/footnotes.html new file mode 100644 index 00000000000..0993ecc6903 --- /dev/null +++ b/cfgov/v1/jinja2/v1/includes/molecules/footnotes.html @@ -0,0 +1,27 @@ +{# ========================================================================== + + footnotes.render() + + ========================================================================== + + Description: + + Create footnote markup when given: + + footnotes: An array of Footnote objects + + ========================================================================== #} + +{% macro render( footnotes ) %} +
+

Footnotes

+
    + {% for footnote in footnotes %} +
  1. + {{ footnote.text | richtext }} + ↩ +
  2. + {% endfor %} +
+
+{% endmacro %} diff --git a/cfgov/v1/jinja2/v1/includes/organisms/full-width-text.html b/cfgov/v1/jinja2/v1/includes/organisms/full-width-text.html index 3981d00161b..dd73ab1254a 100644 --- a/cfgov/v1/jinja2/v1/includes/organisms/full-width-text.html +++ b/cfgov/v1/jinja2/v1/includes/organisms/full-width-text.html @@ -20,7 +20,7 @@ {% include_block block %} {% elif 'content' in block_type %}
- {{ block.value | safe }} + {% include_block block %}
{% elif block_type == 'table_block' %}
diff --git a/cfgov/v1/jinja2/v1/includes/rich-text/footnote-reference.html b/cfgov/v1/jinja2/v1/includes/rich-text/footnote-reference.html new file mode 100644 index 00000000000..27e497e5828 --- /dev/null +++ b/cfgov/v1/jinja2/v1/includes/rich-text/footnote-reference.html @@ -0,0 +1 @@ +{{ index }} diff --git a/cfgov/v1/jinja2/v1/layouts/_footnotes.html b/cfgov/v1/jinja2/v1/layouts/_footnotes.html new file mode 100644 index 00000000000..fcdc31a6680 --- /dev/null +++ b/cfgov/v1/jinja2/v1/layouts/_footnotes.html @@ -0,0 +1,4 @@ +{% if page and page.footnotes_list %} + {%- import 'v1/includes/molecules/footnotes.html' as footnotes with context -%} + {{ footnotes.render(page.footnotes_list) }} +{% endif %} diff --git a/cfgov/v1/jinja2/v1/layouts/layout-1-3.html b/cfgov/v1/jinja2/v1/layouts/layout-1-3.html index 20bf97c29db..7186c2f3081 100644 --- a/cfgov/v1/jinja2/v1/layouts/layout-1-3.html +++ b/cfgov/v1/jinja2/v1/layouts/layout-1-3.html @@ -26,6 +26,7 @@
{% block content_main scoped -%}{%- endblock %} + {% include 'v1/layouts/_footnotes.html' %}
{% endblock %}
diff --git a/cfgov/v1/jinja2/v1/layouts/layout-2-1.html b/cfgov/v1/jinja2/v1/layouts/layout-2-1.html index 80a165c415a..15339295c39 100644 --- a/cfgov/v1/jinja2/v1/layouts/layout-2-1.html +++ b/cfgov/v1/jinja2/v1/layouts/layout-2-1.html @@ -20,6 +20,7 @@ {% block body_content scoped %}
{% block content_main scoped -%}{%- endblock %} + {% include 'v1/layouts/_footnotes.html' %}