From 7b6aca6ceb6f35ae458acfe363ce43090bcf4493 Mon Sep 17 00:00:00 2001 From: Frank Duncan Date: Thu, 4 Jul 2024 13:59:03 -0500 Subject: [PATCH] Enable group stream boxes when in draft mode They are disabled when editing a proposal in general, but in the case of a draft, the users sometimes need to be able to edit them in order to finish an application. This fix may be incomplete, as it does not allow the group forms to have the full functionality of hiding the followup forms when "No" is selected, and showing them when "Yes" is selected. Semi fixes issue #4031 --- hypha/apply/funds/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hypha/apply/funds/views.py b/hypha/apply/funds/views.py index cecfbe4d61..991f449447 100644 --- a/hypha/apply/funds/views.py +++ b/hypha/apply/funds/views.py @@ -1487,7 +1487,10 @@ class that doesn't validate required fields while saving. ) field_blocks = self.object.get_defined_fields() for field_block in field_blocks: - if isinstance(field_block.block, GroupToggleBlock): + if ( + isinstance(field_block.block, GroupToggleBlock) + and not self.object.is_draft + ): # Disable group toggle field as it is not supported on edit forms. form_fields[field_block.id].disabled = True return type(