From f7b7cb26e157329060feeb307658abb6c5bd1104 Mon Sep 17 00:00:00 2001 From: Montana Date: Fri, 18 Jan 2019 13:27:15 -0500 Subject: [PATCH] Toggle COR Invite checkbox --- atst/forms/task_order.py | 2 +- js/components/forms/oversight.js | 2 ++ templates/task_orders/new/oversight.html | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/atst/forms/task_order.py b/atst/forms/task_order.py index 51cd4306..34616029 100644 --- a/atst/forms/task_order.py +++ b/atst/forms/task_order.py @@ -132,7 +132,7 @@ class OversightForm(CacheableForm): ) cor_dod_id = StringField( translate("forms.task_order.oversight_dod_id_label"), - validators=[RequiredIf("am_cor", False), Length(min=10), IsNumber()], + validators=[RequiredIf("am_cor", False), RequiredIf("cor_invite"), Length(min=10), IsNumber()], ) so_first_name = StringField( diff --git a/js/components/forms/oversight.js b/js/components/forms/oversight.js index fe217bbc..b9864ca7 100644 --- a/js/components/forms/oversight.js +++ b/js/components/forms/oversight.js @@ -23,12 +23,14 @@ export default { const { am_cor = false, ko_invite = false, + cor_invite = false, so_invite = false, } = this.initialData return { am_cor, ko_invite, + cor_invite, so_invite, } } diff --git a/templates/task_orders/new/oversight.html b/templates/task_orders/new/oversight.html index e784e80b..e5dbb52b 100644 --- a/templates/task_orders/new/oversight.html +++ b/templates/task_orders/new/oversight.html @@ -29,7 +29,9 @@