Do not require portfolio name and defense component when building a new TO from a portfolio

This commit is contained in:
Montana
2019-03-05 11:23:46 -05:00
parent 3c21857c97
commit 85fcee005e
2 changed files with 27 additions and 16 deletions

View File

@@ -27,26 +27,11 @@ from .data import (
from atst.utils.localization import translate
class AppInfoForm(BaseForm):
portfolio_name = StringField(
translate("forms.task_order.portfolio_name_label"),
description=translate("forms.task_order.portfolio_name_description"),
validators=[
Required(),
Length(
min=4,
max=100,
message=translate("forms.portfolio.name_length_validation_message"),
),
],
)
class AppInfoWithExistingPortfolioForm(BaseForm):
scope = TextAreaField(
translate("forms.task_order.scope_label"),
description=translate("forms.task_order.scope_description"),
)
defense_component = SelectField(
translate("forms.task_order.defense_component_label"), choices=SERVICE_BRANCHES
)
app_migration = RadioField(
translate("forms.task_order.app_migration.label"),
description=translate("forms.task_order.app_migration.description"),
@@ -88,6 +73,24 @@ class AppInfoForm(BaseForm):
)
class AppInfoForm(AppInfoWithExistingPortfolioForm):
portfolio_name = StringField(
translate("forms.task_order.portfolio_name_label"),
description=translate("forms.task_order.portfolio_name_description"),
validators=[
Required(),
Length(
min=4,
max=100,
message=translate("forms.portfolio.name_length_validation_message"),
),
],
)
defense_component = SelectField(
translate("forms.task_order.defense_component_label"), choices=SERVICE_BRANCHES
)
class FundingForm(BaseForm):
performance_length = SelectField(
translate("forms.task_order.performance_length.label"),