diff --git a/opentech/apply/funds/blocks.py b/opentech/apply/funds/blocks.py index a8e0c79a4cbad40304815736bcde2ce253ab89be..416234725e7564b5441a3f697a47700c1f195a02 100644 --- a/opentech/apply/funds/blocks.py +++ b/opentech/apply/funds/blocks.py @@ -53,3 +53,6 @@ class FullNameBlock(ApplicationMustIncludeFieldBlock): class ApplicationCustomFormFieldsBlock(CustomFormFieldsBlock, FormFieldsBlock): category = CategoryQuestionBlock(group=_('Custom')) required_blocks = ApplicationMustIncludeFieldBlock.__subclasses__() + + +REQUIRED_BLOCK_NAMES = [block.name for block in ApplicationMustIncludeFieldBlock.__subclasses__()] diff --git a/opentech/apply/funds/models.py b/opentech/apply/funds/models.py index 74d0017f1c6b28971dbe11e68251a32b95ce92f5..6f30c715bbaa884d9d8280760e0369a63b4e2053 100644 --- a/opentech/apply/funds/models.py +++ b/opentech/apply/funds/models.py @@ -36,10 +36,10 @@ from wagtail.contrib.forms.models import AbstractEmailForm, AbstractFormSubmissi from opentech.apply.stream_forms.blocks import UploadableMediaBlock from opentech.apply.stream_forms.models import AbstractStreamForm, BaseStreamForm from opentech.apply.users.groups import REVIEWER_GROUP_NAME, STAFF_GROUP_NAME -from opentech.apply.utils.blocks import MustIncludeFieldBlock, REQUIRED_BLOCK_NAMES +from opentech.apply.utils.blocks import MustIncludeFieldBlock from .admin_forms import WorkflowFormAdminForm -from .blocks import ApplicationCustomFormFieldsBlock +from .blocks import ApplicationCustomFormFieldsBlock, REQUIRED_BLOCK_NAMES from .edit_handlers import FilteredFieldPanel, ReadOnlyPanel, ReadOnlyInlinePanel from .workflow import ( active_statuses, diff --git a/opentech/apply/utils/blocks.py b/opentech/apply/utils/blocks.py index 73dd805b68791b0aaaae2debcf8356d6b128a821..5c0e7dbcc0817e3d5f8c4e722344ad5fde290098 100644 --- a/opentech/apply/utils/blocks.py +++ b/opentech/apply/utils/blocks.py @@ -161,6 +161,3 @@ class MustIncludeFieldBlock(FormFieldBlock): kwargs = super().get_field_kwargs(struct_value) kwargs['required'] = True return kwargs - - -REQUIRED_BLOCK_NAMES = [block.name for block in MustIncludeFieldBlock.__subclasses__()]