Skip to content

Commit

Permalink
Merge branch 'feature/6447-cta-link-style' of github.com:torchbox/rca…
Browse files Browse the repository at this point in the history
…-wagtail-2019 into dev
  • Loading branch information
Patrick Gan committed Sep 20, 2024
2 parents 982e6a0 + e435eef commit 0036c40
Show file tree
Hide file tree
Showing 8 changed files with 887 additions and 1 deletion.
121 changes: 121 additions & 0 deletions rca/editorial/migrations/0032_link_block_url_label.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Generated by Django 4.2.11 on 2024-09-20 07:14

from django.db import migrations
import rca.navigation.models
import wagtail.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks


class Migration(migrations.Migration):

dependencies = [
("editorial", "0031_cta_link_block"),
]

operations = [
migrations.AlterField(
model_name="editorialpage",
name="body",
field=wagtail.fields.StreamField(
[
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"image_with_caption",
wagtail.blocks.StructBlock(
[
("image", wagtail.images.blocks.ImageChooserBlock()),
("caption", wagtail.blocks.CharBlock(required=False)),
(
"decorative",
wagtail.blocks.BooleanBlock(
help_text="Toggle to make image decorative so they can be ignored by assistive technologies.",
required=False,
),
),
]
),
),
(
"heading",
wagtail.blocks.CharBlock(
form_classname="full title",
icon="title",
template="patterns/molecules/streamfield/blocks/heading_block.html",
),
),
("paragraph", wagtail.blocks.RichTextBlock()),
("embed", wagtail.embeds.blocks.EmbedBlock()),
(
"quote",
wagtail.blocks.StructBlock(
[
(
"quote",
wagtail.blocks.CharBlock(
form_classname="title",
help_text="Enter quote text only, there is no need to add quotation marks",
),
),
("author", wagtail.blocks.CharBlock(required=False)),
("job_title", wagtail.blocks.CharBlock(required=False)),
]
),
),
(
"jw_video",
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
help_text="Optional title to identify the video. Not shown on the page.",
required=False,
),
),
(
"video_url",
wagtail.blocks.URLBlock(
help_text="The URL of the video to show.",
max_length=1000,
),
),
(
"poster_image",
wagtail.images.blocks.ImageChooserBlock(
help_text="The poster image to show as a placeholder for the video. For best results use an image 1920x1080 pixels"
),
),
]
),
),
(
"cta_link",
wagtail.blocks.StructBlock(
[
(
"url",
rca.navigation.models.URLOrRelativeURLBLock(
label="URL", required=False
),
),
(
"page",
wagtail.blocks.PageChooserBlock(required=False),
),
(
"title",
wagtail.blocks.CharBlock(
help_text="Leave blank to use the page's own title, required if using a URL",
required=False,
),
),
]
),
),
],
blank=True,
),
),
]
104 changes: 104 additions & 0 deletions rca/events/migrations/0022_link_block_url_label.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Generated by Django 4.2.11 on 2024-09-20 07:14

from django.db import migrations
import rca.navigation.models
import wagtail.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks


class Migration(migrations.Migration):

dependencies = [
("events", "0021_cta_link_block"),
]

operations = [
migrations.AlterField(
model_name="eventdetailpage",
name="body",
field=wagtail.fields.StreamField(
[
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"heading",
wagtail.blocks.CharBlock(
form_classname="full title",
icon="title",
template="patterns/molecules/streamfield/blocks/heading_block.html",
),
),
("paragraph", wagtail.blocks.RichTextBlock()),
(
"quote",
wagtail.blocks.StructBlock(
[
(
"quote",
wagtail.blocks.CharBlock(
form_classname="title",
help_text="Enter quote text only, there is no need to add quotation marks",
),
),
("author", wagtail.blocks.CharBlock(required=False)),
("job_title", wagtail.blocks.CharBlock(required=False)),
]
),
),
("embed", wagtail.embeds.blocks.EmbedBlock()),
(
"jw_video",
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
help_text="Optional title to identify the video. Not shown on the page.",
required=False,
),
),
(
"video_url",
wagtail.blocks.URLBlock(
help_text="The URL of the video to show.",
max_length=1000,
),
),
(
"poster_image",
wagtail.images.blocks.ImageChooserBlock(
help_text="The poster image to show as a placeholder for the video. For best results use an image 1920x1080 pixels"
),
),
]
),
),
(
"cta_link",
wagtail.blocks.StructBlock(
[
(
"url",
rca.navigation.models.URLOrRelativeURLBLock(
label="URL", required=False
),
),
(
"page",
wagtail.blocks.PageChooserBlock(required=False),
),
(
"title",
wagtail.blocks.CharBlock(
help_text="Leave blank to use the page's own title, required if using a URL",
required=False,
),
),
]
),
),
]
),
),
]
Loading

0 comments on commit 0036c40

Please sign in to comment.