-
Notifications
You must be signed in to change notification settings - Fork 919
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove strikethrough as an option for rich text (#15503)
Struck-through text does not end up as editable at our l10n vendor's side of things, which means localization breaks for any page containing it. We don't use it anyway, so better to avoid it being sent over altogether. The migration is needed because it describes the state of the page model that already has a rich-text field in it, and we just changed that state by removing a formatting option. Resolves #15498
- Loading branch information
1 parent
e4df84e
commit 0ca1f34
Showing
2 changed files
with
184 additions
and
1 deletion.
There are no files selected for viewing
184 changes: 184 additions & 0 deletions
184
bedrock/mozorg/migrations/0005_alter_leadershippage_leadership_sections.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
# Generated by Django 4.2.16 on 2024-11-15 09:19 | ||
|
||
from django.db import migrations | ||
|
||
import wagtail.blocks | ||
import wagtail.fields | ||
import wagtail.images.blocks | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("mozorg", "0004_alter_leadershippage_leadership_sections"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="leadershippage", | ||
name="leadership_sections", | ||
field=wagtail.fields.StreamField( | ||
[ | ||
( | ||
"section", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"title", | ||
wagtail.blocks.CharBlock( | ||
blank=True, | ||
help_text="Title for the section of the page e.g. 'Mozilla Corporation' or 'Mozilla Foundation.", | ||
max_length=255, | ||
null=True, | ||
), | ||
), | ||
( | ||
"leadership_group", | ||
wagtail.blocks.ListBlock( | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"title", | ||
wagtail.blocks.CharBlock( | ||
char_max_length=255, | ||
help_text="Leadership group title, e.g. 'Executive Steering Committee' or 'Senior Leadership'.", # noqa: E501 | ||
required=False, | ||
), | ||
), | ||
( | ||
"leaders", | ||
wagtail.blocks.ListBlock( | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"name", | ||
wagtail.blocks.CharBlock( | ||
char_max_length=255, | ||
placeholder="Enter the person's full name.", | ||
), | ||
), | ||
( | ||
"headshot", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"image", | ||
wagtail.images.blocks.ImageChooserBlock( | ||
help_text="A headshot image of the person." | ||
), | ||
), | ||
( | ||
"image_alt_text", | ||
wagtail.blocks.CharBlock( | ||
char_max_length=255, | ||
help_text="Alt text for the headshot image.", | ||
), | ||
), | ||
( | ||
"photos_link", | ||
wagtail.blocks.URLBlock( | ||
char_max_length=255, | ||
help_text="External link to a .zip file of photos of the person.", | ||
required=False, | ||
), | ||
), | ||
] | ||
), | ||
), | ||
( | ||
"job_title", | ||
wagtail.blocks.CharBlock( | ||
char_max_length=255, | ||
required=False, | ||
), | ||
), | ||
( | ||
"biography", | ||
wagtail.blocks.RichTextBlock( | ||
features=[ | ||
"h2", | ||
"h3", | ||
"hr", | ||
"bold", | ||
"italic", | ||
"code", | ||
"blockquote", | ||
"link", | ||
"ol", | ||
"ul", | ||
"image", | ||
], | ||
help_text="A biography limited to a few short paragraphs. Links and formatting are supported.", # noqa: E501 | ||
required=False, | ||
), | ||
), | ||
( | ||
"external_links", | ||
wagtail.blocks.ListBlock( | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"url", | ||
wagtail.blocks.URLBlock( | ||
char_max_length=255, | ||
help_text="Link to the person's website or social media account.", # noqa: E501 | ||
required=False, | ||
), | ||
), | ||
( | ||
"type", | ||
wagtail.blocks.ChoiceBlock( | ||
choices=[ | ||
( | ||
"url mastodon", | ||
"Mastodon", | ||
), | ||
( | ||
"url twitter", | ||
"Twitter", | ||
), | ||
( | ||
"url website", | ||
"Website", | ||
), | ||
], | ||
help_text="Selects a visual icon type for the link.", | ||
required=False, | ||
), | ||
), | ||
( | ||
"text", | ||
wagtail.blocks.CharBlock( | ||
char_max_length=255, | ||
help_text="Text to display for the link.", | ||
required=False, | ||
), | ||
), | ||
] | ||
), | ||
max_num=5, | ||
min_num=0, | ||
), | ||
), | ||
] | ||
), | ||
min_num=1, | ||
), | ||
), | ||
] | ||
), | ||
min_num=1, | ||
), | ||
), | ||
] | ||
), | ||
) | ||
], | ||
blank=True, | ||
null=True, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters