Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'chore/change-minimum-for-key-points-block' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
helenb committed Nov 13, 2023
2 parents 89b4dce + 4676896 commit 11d2cdb
Show file tree
Hide file tree
Showing 9 changed files with 200 additions and 2 deletions.
27 changes: 27 additions & 0 deletions tbx/blog/migrations/0029_change_minimum_number_for_key_points.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 3.2.20 on 2023-11-10 09:58

from django.db import migrations
import wagtail.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks


class Migration(migrations.Migration):

dependencies = [
('blog', '0028_add_social_fields_to_all_page_types'),
]

operations = [
migrations.AlterField(
model_name='blogindexpage',
name='call_to_action',
field=wagtail.fields.StreamField([('key_points_summary', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock())]), help_text='Please add a minumum of 3 and a maximum of 6 key points.', icon='list-ul', max_num=6, min_num=3, template='patterns/molecules/streamfield/blocks/key_points_summary.html')), ('testimonials', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('name', wagtail.blocks.CharBlock()), ('role', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='openquote', template='patterns/molecules/streamfield/blocks/testimonial_block.html')), ('clients', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='site', label='Clients logo', template='patterns/molecules/streamfield/blocks/client-logo-block.html')), ('embed_plus_cta', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock(required=False)), ('external_link', wagtail.blocks.URLBlock(label='External Link', required=False)), ('button_text', wagtail.blocks.CharBlock()), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('embed', wagtail.embeds.blocks.EmbedBlock(label='Youtube Embed', required=False))], icon='code', label='Embed + CTA', template='patterns/molecules/streamfield/blocks/embed_plus_cta_block.html')), ('cta', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(help_text='Words in <span> tag will display in a contrasting colour.')), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))]))], icon='plus-inverse', template='patterns/molecules/streamfield/blocks/cta.html'))], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='blogpage',
name='call_to_action',
field=wagtail.fields.StreamField([('key_points_summary', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock())]), help_text='Please add a minumum of 3 and a maximum of 6 key points.', icon='list-ul', max_num=6, min_num=3, template='patterns/molecules/streamfield/blocks/key_points_summary.html')), ('testimonials', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('name', wagtail.blocks.CharBlock()), ('role', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='openquote', template='patterns/molecules/streamfield/blocks/testimonial_block.html')), ('clients', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='site', label='Clients logo', template='patterns/molecules/streamfield/blocks/client-logo-block.html')), ('embed_plus_cta', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock(required=False)), ('external_link', wagtail.blocks.URLBlock(label='External Link', required=False)), ('button_text', wagtail.blocks.CharBlock()), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('embed', wagtail.embeds.blocks.EmbedBlock(label='Youtube Embed', required=False))], icon='code', label='Embed + CTA', template='patterns/molecules/streamfield/blocks/embed_plus_cta_block.html')), ('cta', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(help_text='Words in <span> tag will display in a contrasting colour.')), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))]))], icon='plus-inverse', template='patterns/molecules/streamfield/blocks/cta.html'))], blank=True, use_json_field=True),
),
]
4 changes: 2 additions & 2 deletions tbx/core/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ class PageSectionStoryBlock(StreamBlock):
key_points_summary = ListBlock(
KeyPoint(),
icon="list-ul",
min_num=4,
min_num=3,
max_num=6,
template="patterns/molecules/streamfield/blocks/key_points_summary.html",
help_text="Please add a minumum of 4 and a maximum of 6 key points.",
help_text="Please add a minumum of 3 and a maximum of 6 key points.",
)
testimonials = ListBlock(
TestimonialBlock(),
Expand Down
22 changes: 22 additions & 0 deletions tbx/core/migrations/0153_change_minimum_number_for_key_points.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.20 on 2023-11-10 09:58

from django.db import migrations
import wagtail.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks


class Migration(migrations.Migration):

dependencies = [
('torchbox', '0152_add_social_fields_to_all_page_types'),
]

operations = [
migrations.AlterField(
model_name='standardpage',
name='additional_content',
field=wagtail.fields.StreamField([('key_points_summary', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock())]), help_text='Please add a minumum of 3 and a maximum of 6 key points.', icon='list-ul', max_num=6, min_num=3, template='patterns/molecules/streamfield/blocks/key_points_summary.html')), ('testimonials', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('name', wagtail.blocks.CharBlock()), ('role', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='openquote', template='patterns/molecules/streamfield/blocks/testimonial_block.html')), ('clients', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='site', label='Clients logo', template='patterns/molecules/streamfield/blocks/client-logo-block.html')), ('embed_plus_cta', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock(required=False)), ('external_link', wagtail.blocks.URLBlock(label='External Link', required=False)), ('button_text', wagtail.blocks.CharBlock()), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('embed', wagtail.embeds.blocks.EmbedBlock(label='Youtube Embed', required=False))], icon='code', label='Embed + CTA', template='patterns/molecules/streamfield/blocks/embed_plus_cta_block.html')), ('cta', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(help_text='Words in <span> tag will display in a contrasting colour.')), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))]))], icon='plus-inverse', template='patterns/molecules/streamfield/blocks/cta.html'))], blank=True, use_json_field=True, verbose_name='Call to action'),
),
]
22 changes: 22 additions & 0 deletions tbx/events/migrations/0005_change_minimum_number_for_key_points.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.20 on 2023-11-10 09:58

from django.db import migrations
import wagtail.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks


class Migration(migrations.Migration):

dependencies = [
('events', '0004_add_social_fields_to_all_page_types'),
]

operations = [
migrations.AlterField(
model_name='eventindexpage',
name='call_to_action',
field=wagtail.fields.StreamField([('key_points_summary', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock())]), help_text='Please add a minumum of 3 and a maximum of 6 key points.', icon='list-ul', max_num=6, min_num=3, template='patterns/molecules/streamfield/blocks/key_points_summary.html')), ('testimonials', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('name', wagtail.blocks.CharBlock()), ('role', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='openquote', template='patterns/molecules/streamfield/blocks/testimonial_block.html')), ('clients', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='site', label='Clients logo', template='patterns/molecules/streamfield/blocks/client-logo-block.html')), ('embed_plus_cta', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock(required=False)), ('external_link', wagtail.blocks.URLBlock(label='External Link', required=False)), ('button_text', wagtail.blocks.CharBlock()), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('embed', wagtail.embeds.blocks.EmbedBlock(label='Youtube Embed', required=False))], icon='code', label='Embed + CTA', template='patterns/molecules/streamfield/blocks/embed_plus_cta_block.html')), ('cta', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(help_text='Words in <span> tag will display in a contrasting colour.')), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))]))], icon='plus-inverse', template='patterns/molecules/streamfield/blocks/cta.html'))], blank=True, use_json_field=True),
),
]
27 changes: 27 additions & 0 deletions tbx/people/migrations/0035_change_minimum_number_for_key_points.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 3.2.20 on 2023-11-10 09:58

from django.db import migrations
import wagtail.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks


class Migration(migrations.Migration):

dependencies = [
('people', '0034_add_social_fields_to_all_page_types'),
]

operations = [
migrations.AlterField(
model_name='personindexpage',
name='call_to_action',
field=wagtail.fields.StreamField([('key_points_summary', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock())]), help_text='Please add a minumum of 3 and a maximum of 6 key points.', icon='list-ul', max_num=6, min_num=3, template='patterns/molecules/streamfield/blocks/key_points_summary.html')), ('testimonials', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('name', wagtail.blocks.CharBlock()), ('role', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='openquote', template='patterns/molecules/streamfield/blocks/testimonial_block.html')), ('clients', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='site', label='Clients logo', template='patterns/molecules/streamfield/blocks/client-logo-block.html')), ('embed_plus_cta', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock(required=False)), ('external_link', wagtail.blocks.URLBlock(label='External Link', required=False)), ('button_text', wagtail.blocks.CharBlock()), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('embed', wagtail.embeds.blocks.EmbedBlock(label='Youtube Embed', required=False))], icon='code', label='Embed + CTA', template='patterns/molecules/streamfield/blocks/embed_plus_cta_block.html')), ('cta', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(help_text='Words in <span> tag will display in a contrasting colour.')), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))]))], icon='plus-inverse', template='patterns/molecules/streamfield/blocks/cta.html'))], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='personpage',
name='call_to_action',
field=wagtail.fields.StreamField([('key_points_summary', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock())]), help_text='Please add a minumum of 3 and a maximum of 6 key points.', icon='list-ul', max_num=6, min_num=3, template='patterns/molecules/streamfield/blocks/key_points_summary.html')), ('testimonials', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('name', wagtail.blocks.CharBlock()), ('role', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='openquote', template='patterns/molecules/streamfield/blocks/testimonial_block.html')), ('clients', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))], required=False))]), icon='site', label='Clients logo', template='patterns/molecules/streamfield/blocks/client-logo-block.html')), ('embed_plus_cta', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('intro', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.PageChooserBlock(required=False)), ('external_link', wagtail.blocks.URLBlock(label='External Link', required=False)), ('button_text', wagtail.blocks.CharBlock()), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('embed', wagtail.embeds.blocks.EmbedBlock(label='Youtube Embed', required=False))], icon='code', label='Embed + CTA', template='patterns/molecules/streamfield/blocks/embed_plus_cta_block.html')), ('cta', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(help_text='Words in <span> tag will display in a contrasting colour.')), ('link', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(required=False))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock())]))]))], icon='plus-inverse', template='patterns/molecules/streamfield/blocks/cta.html'))], blank=True, use_json_field=True),
),
]
14 changes: 14 additions & 0 deletions tbx/propositions/migrations/0018_merge_20231109_1255.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Django 3.2.20 on 2023-11-09 12:55

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('propositions', '0016_add_work_and_thinking_to_proposition_page'),
('propositions', '0017_remove_heading_for_processes_field'),
]

operations = [
]
Loading

0 comments on commit 11d2cdb

Please sign in to comment.