Skip to content
Snippets Groups Projects
Commit 6a0512d5 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Add some help text about the Must Include blocks

parent fe4e4328
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,9 @@ class CustomFormFieldsBlock(FormFieldsBlock):
class MustIncludeStatic(StaticBlock):
"""Helper block which displays additional information about the must include block and
helps display the error in a noticeable way.
"""
def __init__(self, *args, description='', **kwargs):
self.description = description
super().__init__(*args, **kwargs)
......@@ -88,6 +91,9 @@ class MustIncludeStatic(StaticBlock):
class MustIncludeFieldBlock(FormFieldBlock):
"""Any block inheriting from this will need to be included in the application forms
This data will also be available to query on the submission object
"""
def __init__(self, *args, **kwargs):
info_name = f'{self.name.title()} Field'
child_blocks = [('info', MustIncludeStatic(label=info_name, description=self.description))]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment