From 6a0512d579dc50bba9b556bd5b2905327b5881db Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Wed, 24 Jan 2018 09:44:16 +0000 Subject: [PATCH] Add some help text about the Must Include blocks --- opentech/apply/funds/blocks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opentech/apply/funds/blocks.py b/opentech/apply/funds/blocks.py index a8b4a83d9..4a5ab6c41 100644 --- a/opentech/apply/funds/blocks.py +++ b/opentech/apply/funds/blocks.py @@ -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))] -- GitLab