Skip to content

Commit

Permalink
Update warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Crow committed Oct 24, 2024
1 parent b54083f commit b1f955b
Show file tree
Hide file tree
Showing 7 changed files with 657 additions and 210 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.2 on 2024-10-24 13:42
# Generated by Django 5.1.2 on 2024-10-24 14:00

import wagtail.fields
from django.db import migrations
Expand Down Expand Up @@ -689,7 +689,8 @@ class Migration(migrations.Migration):
"wagtail.blocks.StreamBlock",
[[("button", 86)]],
{
"help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side."
"help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.",
"label": "Buttons",
},
),
88: (
Expand Down Expand Up @@ -1347,6 +1348,92 @@ class Migration(migrations.Migration):
},
),
),
migrations.AlterField(
model_name="blogentrypage",
name="header_cta_buttons",
field=wagtail.fields.StreamField(
[("buttons", 8)],
blank=True,
block_lookup={
0: (
"wagtail.blocks.PageChooserBlock",
(),
{
"help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.",
"label": "Page",
"required": False,
},
),
1: (
"wagtail.documents.blocks.DocumentChooserBlock",
(),
{
"help_text": "Use either this, the external URL or the page parameter.",
"label": "Document",
"required": False,
},
),
2: (
"wagtail.blocks.URLBlock",
(),
{
"help_text": "Use either this, the document or the page parameter.",
"label": "External URL",
"required": False,
},
),
3: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}),
4: (
"wagtail.blocks.ChoiceBlock",
[],
{
"choices": [
("fr-btn", "Primary"),
("fr-btn fr-btn--secondary", "Secundary"),
("fr-btn fr-btn--tertiary", "Tertiary"),
("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"),
],
"label": "Button type",
"required": False,
},
),
5: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}),
6: (
"wagtail.blocks.ChoiceBlock",
[],
{
"choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")],
"label": "Icon side",
"required": False,
},
),
7: (
"wagtail.blocks.StructBlock",
[
[
("page", 0),
("document", 1),
("external_url", 2),
("text", 3),
("button_type", 4),
("icon_class", 5),
("icon_side", 6),
]
],
{"label": "Button"},
),
8: (
"wagtail.blocks.StreamBlock",
[[("button", 7)]],
{
"help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.",
"label": "Buttons",
},
),
},
null=True,
),
),
migrations.AlterField(
model_name="blogindexpage",
name="body",
Expand Down Expand Up @@ -2026,7 +2113,8 @@ class Migration(migrations.Migration):
"wagtail.blocks.StreamBlock",
[[("button", 86)]],
{
"help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side."
"help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.",
"label": "Buttons",
},
),
88: (
Expand Down Expand Up @@ -2684,6 +2772,92 @@ class Migration(migrations.Migration):
},
),
),
migrations.AlterField(
model_name="blogindexpage",
name="header_cta_buttons",
field=wagtail.fields.StreamField(
[("buttons", 8)],
blank=True,
block_lookup={
0: (
"wagtail.blocks.PageChooserBlock",
(),
{
"help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.",
"label": "Page",
"required": False,
},
),
1: (
"wagtail.documents.blocks.DocumentChooserBlock",
(),
{
"help_text": "Use either this, the external URL or the page parameter.",
"label": "Document",
"required": False,
},
),
2: (
"wagtail.blocks.URLBlock",
(),
{
"help_text": "Use either this, the document or the page parameter.",
"label": "External URL",
"required": False,
},
),
3: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}),
4: (
"wagtail.blocks.ChoiceBlock",
[],
{
"choices": [
("fr-btn", "Primary"),
("fr-btn fr-btn--secondary", "Secundary"),
("fr-btn fr-btn--tertiary", "Tertiary"),
("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"),
],
"label": "Button type",
"required": False,
},
),
5: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}),
6: (
"wagtail.blocks.ChoiceBlock",
[],
{
"choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")],
"label": "Icon side",
"required": False,
},
),
7: (
"wagtail.blocks.StructBlock",
[
[
("page", 0),
("document", 1),
("external_url", 2),
("text", 3),
("button_type", 4),
("icon_class", 5),
("icon_side", 6),
]
],
{"label": "Button"},
),
8: (
"wagtail.blocks.StreamBlock",
[[("button", 7)]],
{
"help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.",
"label": "Buttons",
},
),
},
null=True,
),
),
migrations.AlterField(
model_name="category",
name="colophon",
Expand Down Expand Up @@ -3198,7 +3372,8 @@ class Migration(migrations.Migration):
"wagtail.blocks.StreamBlock",
[[("button", 63)]],
{
"help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side."
"help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.",
"label": "Buttons",
},
),
65: (
Expand Down
6 changes: 5 additions & 1 deletion content_manager/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ class SitesFacilesBasePage(Page):
(
"buttons",
ButtonsHorizontalListBlock(
help_text=_("Please use only one primary button. If you use icons, align them on the same side.")
help_text=_(
"""Please use only one primary button.
If you use icons, use them on all buttons and align them on the same side."""
),
label=_("Buttons"),
),
),
],
Expand Down
6 changes: 4 additions & 2 deletions content_manager/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ class CardBlock(blocks.StructBlock):
help_text=_(
"""Please use only one primary button.
If you use icons, use them on all buttons and align them on the same side."""
)
),
label=_("Buttons"),
),
),
],
Expand Down Expand Up @@ -647,7 +648,8 @@ class TextAndCTA(blocks.StructBlock):
help_text=_(
"""Please use only one primary button.
If you use icons, use them on all buttons and align them on the same side."""
)
),
label=_("Buttons"),
),
),
],
Expand Down
Binary file modified content_manager/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit b1f955b

Please sign in to comment.