show or hide manual TO fields based on query param
This commit is contained in:
@@ -57,12 +57,7 @@ def validate_pe_id(field, existing_request):
|
||||
return True
|
||||
|
||||
|
||||
class FinancialForm(ValidatedForm):
|
||||
def validate(self, *args, **kwargs):
|
||||
if self.funding_type.data == "OTHER":
|
||||
self.funding_type_other.validators.append(Required())
|
||||
return super().validate(*args, **kwargs)
|
||||
|
||||
class BaseFinancialForm(ValidatedForm):
|
||||
def reset(self):
|
||||
"""
|
||||
Reset UII info so that it can be de-parsed rendered properly.
|
||||
@@ -117,6 +112,17 @@ class FinancialForm(ValidatedForm):
|
||||
"Contracting Officer Representative (COR) Office", validators=[Required()]
|
||||
)
|
||||
|
||||
|
||||
class FinancialForm(BaseFinancialForm):
|
||||
pass
|
||||
|
||||
|
||||
class ExtendedFinancialForm(BaseFinancialForm):
|
||||
def validate(self, *args, **kwargs):
|
||||
if self.funding_type.data == "OTHER":
|
||||
self.funding_type_other.validators.append(Required())
|
||||
return super().validate(*args, **kwargs)
|
||||
|
||||
funding_type = SelectField(
|
||||
description="What is the source of funding?",
|
||||
choices=[
|
||||
|
Reference in New Issue
Block a user