From cbea71259c55bd11435c807d94d3f052f20b50ec Mon Sep 17 00:00:00 2001 From: graham-dds Date: Thu, 12 Dec 2019 10:41:04 -0500 Subject: [PATCH] Move checkbox validation message to translations --- atst/forms/portfolio.py | 6 +++++- translations.yaml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/atst/forms/portfolio.py b/atst/forms/portfolio.py index 270020ab..7f281787 100644 --- a/atst/forms/portfolio.py +++ b/atst/forms/portfolio.py @@ -42,6 +42,10 @@ class PortfolioCreationForm(BaseForm): widget=ListWidget(prefix_label=False), option_widget=CheckboxInput(), validators=[ - InputRequired(message="You must select at least one defense component.") + InputRequired( + message=translate( + "forms.portfolio.defense_component.validation_message" + ) + ) ], ) diff --git a/translations.yaml b/translations.yaml index 11c88a3f..1fa09b83 100644 --- a/translations.yaml +++ b/translations.yaml @@ -203,6 +203,7 @@ forms: marine_corps: Marine Corps navy: Navy other: Other + validation_message: You must select at least one defense component. help_text: |

Select the DOD component(s) that will fund all Applications within this Portfolio.