diff --git a/CHANGELOG.md b/CHANGELOG.md index d0d3a9ab..7588d12c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Error message when list_items is broken - Consistent labelling on import forms - Fix class_name warning: RemovedInWagtail60Warning +- Helper texts for some ordered content sets ### Removed - Locale field on exports --> diff --git a/home/migrations/0090_alter_orderedcontentset_pages.py b/home/migrations/0090_alter_orderedcontentset_pages.py new file mode 100644 index 00000000..1d6075a1 --- /dev/null +++ b/home/migrations/0090_alter_orderedcontentset_pages.py @@ -0,0 +1,73 @@ +# Generated by Django 4.2.17 on 2025-02-17 07:41 + +from django.db import migrations +import wagtail.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ("home", "0089_alter_assessment_options"), + ] + + operations = [ + migrations.AlterField( + model_name="orderedcontentset", + name="pages", + field=wagtail.fields.StreamField( + [ + ( + "pages", + wagtail.blocks.StructBlock( + [ + ("contentpage", wagtail.blocks.PageChooserBlock()), + ( + "time", + wagtail.blocks.IntegerBlock( + help_text="When should this message be sent? Set the number of hours, days, months or year.", + min_value=0, + required=False, + ), + ), + ( + "unit", + wagtail.blocks.ChoiceBlock( + choices=[ + ("minutes", "Minutes"), + ("hours", "Hours"), + ("days", "Days"), + ("months", "Months"), + ], + help_text="Choose the unit of time to use.", + required=False, + ), + ), + ( + "before_or_after", + wagtail.blocks.ChoiceBlock( + choices=[ + ("after", "After"), + ("before", "Before"), + ], + help_text="Is it ‘before’ or ‘after’ the reference point for your timings, which is set in the contact field below.", + required=False, + ), + ), + ( + "contact_field", + wagtail.blocks.CharBlock( + help_text="This is the reference point used to base the timing of message on. For example, edd (estimated date of birth) or dob (date of birth).", + required=False, + ), + ), + ] + ), + ) + ], + blank=True, + null=True, + use_json_field=True, + ), + ), + ] diff --git a/home/models.py b/home/models.py index 2f0aa512..0041c2cc 100644 --- a/home/models.py +++ b/home/models.py @@ -1207,7 +1207,14 @@ def latest_draft_profile_fields(self): blocks.StructBlock( [ ("contentpage", blocks.PageChooserBlock()), - ("time", blocks.IntegerBlock(min_value=0, required=False)), + ( + "time", + blocks.IntegerBlock( + min_value=0, + required=False, + help_text="When should this message be sent? Set the number of hours, days, months or year.", + ), + ), ( "unit", blocks.ChoiceBlock( @@ -1217,6 +1224,7 @@ def latest_draft_profile_fields(self): ("days", "Days"), ("months", "Months"), ], + help_text="Choose the unit of time to use.", required=False, ), ), @@ -1227,12 +1235,14 @@ def latest_draft_profile_fields(self): ("after", "After"), ("before", "Before"), ], + help_text="Is it ‘before’ or ‘after’ the reference point for your timings, which is set in the contact field below.", required=False, ), ), ( "contact_field", blocks.CharBlock( + help_text="This is the reference point used to base the timing of message on. For example, edd (estimated date of birth) or dob (date of birth).", required=False, ), ),