diff --git a/atst/forms/org.py b/atst/forms/org.py index 275d62c8..ff531d9a 100644 --- a/atst/forms/org.py +++ b/atst/forms/org.py @@ -1,10 +1,12 @@ from wtforms.fields.html5 import EmailField, TelField -from wtforms.fields import RadioField, StringField, SelectField +from wtforms.fields import RadioField, StringField from wtforms.validators import Required, Email import pendulum -from .fields import DateField + +from .fields import DateField, SelectField from .forms import ValidatedForm from .validators import DateRange, PhoneNumber, Alphabet +from .data import SERVICE_BRANCHES class OrgForm(ValidatedForm): @@ -21,54 +23,7 @@ class OrgForm(ValidatedForm): service_branch = SelectField( "Service Branch or Agency", description="Which services and organizations do you belong to within the DoD?", - choices=[ - ("null", "Select an option"), - ("Air Force, Department of the", "Air Force, Department of the"), - ("Army and Air Force Exchange Service", "Army and Air Force Exchange Service"), - ("Army, Department of the", "Army, Department of the"), - ("Defense Advanced Research Projects Agency", "Defense Advanced Research Projects Agency"), - ("Defense Commissary Agency", "Defense Commissary Agency"), - ("Defense Contract Audit Agency", "Defense Contract Audit Agency"), - ("Defense Contract Management Agency", "Defense Contract Management Agency"), - ("Defense Finance & Accounting Service", "Defense Finance & Accounting Service"), - ("Defense Health Agency", "Defense Health Agency"), - ("Defense Information System Agency", "Defense Information System Agency"), - ("Defense Intelligence Agency", "Defense Intelligence Agency"), - ("Defense Legal Services Agency", "Defense Legal Services Agency"), - ("Defense Logistics Agency", "Defense Logistics Agency"), - ("Defense Media Activity", "Defense Media Activity"), - ("Defense Micro Electronics Activity", "Defense Micro Electronics Activity"), - ("Defense POW-MIA Accounting Agency", "Defense POW-MIA Accounting Agency"), - ("Defense Security Cooperation Agency", "Defense Security Cooperation Agency"), - ("Defense Security Service", "Defense Security Service"), - ("Defense Technical Information Center", "Defense Technical Information Center"), - ("Defense Technology Security Administration", "Defense Technology Security Administration"), - ("Defense Threat Reduction Agency", "Defense Threat Reduction Agency"), - ("DoD Education Activity", "DoD Education Activity"), - ("DoD Human Recourses Activity", "DoD Human Recourses Activity"), - ("DoD Inspector General", "DoD Inspector General"), - ("DoD Test Resource Management Center", "DoD Test Resource Management Center"), - ("Headquarters Defense Human Resource Activity ", "Headquarters Defense Human Resource Activity "), - ("Joint Staff", "Joint Staff"), - ("Missile Defense Agency", "Missile Defense Agency"), - ("National Defense University", "National Defense University"), - ("National Geospatial Intelligence Agency (NGA)", "National Geospatial Intelligence Agency (NGA)"), - ("National Oceanic and Atmospheric Administration (NOAA)", "National Oceanic and Atmospheric Administration (NOAA)"), - ("National Reconnaissance Office", "National Reconnaissance Office"), - ("National Reconnaissance Office (NRO)", "National Reconnaissance Office (NRO)"), - ("National Security Agency (NSA)", "National Security Agency (NSA)"), - ("National Security Agency-Central Security Service", "National Security Agency-Central Security Service"), - ("Navy, Department of the", "Navy, Department of the"), - ("Office of Economic Adjustment", "Office of Economic Adjustment"), - ("Office of the Secretary of Defense", "Office of the Secretary of Defense"), - ("Pentagon Force Protection Agency", "Pentagon Force Protection Agency"), - ("Uniform Services University of the Health Sciences", "Uniform Services University of the Health Sciences"), - ("US Cyber Command (USCYBERCOM)", "US Cyber Command (USCYBERCOM)"), - ("US Special Operations Command (USSOCOM)", "US Special Operations Command (USSOCOM)"), - ("US Strategic Command (USSTRATCOM)", "US Strategic Command (USSTRATCOM)"), - ("US Transportation Command (USTRANSCOM)", "US Transportation Command (USTRANSCOM)"), - ("Washington Headquarters Services", "Washington Headquarters Services"), - ], + choices=SERVICE_BRANCHES, ) citizenship = RadioField( diff --git a/atst/forms/request.py b/atst/forms/request.py index c14dacf2..576d9879 100644 --- a/atst/forms/request.py +++ b/atst/forms/request.py @@ -1,9 +1,10 @@ from wtforms.fields.html5 import IntegerField -from wtforms.fields import RadioField, TextAreaField, SelectField +from wtforms.fields import RadioField, TextAreaField from wtforms.validators import Optional, Required -from .fields import DateField +from .fields import DateField, SelectField from .forms import ValidatedForm +from .data import SERVICE_BRANCHES from atst.domain.requests import Requests @@ -37,54 +38,7 @@ class RequestForm(ValidatedForm): dod_component = SelectField( "DoD Component", description="Identify the DoD component that is requesting access to the JEDI Cloud", - choices=[ - ("null", "Select an option"), - ("Air Force, Department of the", "Air Force, Department of the"), - ("Army and Air Force Exchange Service", "Army and Air Force Exchange Service"), - ("Army, Department of the", "Army, Department of the"), - ("Defense Advanced Research Projects Agency", "Defense Advanced Research Projects Agency"), - ("Defense Commissary Agency", "Defense Commissary Agency"), - ("Defense Contract Audit Agency", "Defense Contract Audit Agency"), - ("Defense Contract Management Agency", "Defense Contract Management Agency"), - ("Defense Finance & Accounting Service", "Defense Finance & Accounting Service"), - ("Defense Health Agency", "Defense Health Agency"), - ("Defense Information System Agency", "Defense Information System Agency"), - ("Defense Intelligence Agency", "Defense Intelligence Agency"), - ("Defense Legal Services Agency", "Defense Legal Services Agency"), - ("Defense Logistics Agency", "Defense Logistics Agency"), - ("Defense Media Activity", "Defense Media Activity"), - ("Defense Micro Electronics Activity", "Defense Micro Electronics Activity"), - ("Defense POW-MIA Accounting Agency", "Defense POW-MIA Accounting Agency"), - ("Defense Security Cooperation Agency", "Defense Security Cooperation Agency"), - ("Defense Security Service", "Defense Security Service"), - ("Defense Technical Information Center", "Defense Technical Information Center"), - ("Defense Technology Security Administration", "Defense Technology Security Administration"), - ("Defense Threat Reduction Agency", "Defense Threat Reduction Agency"), - ("DoD Education Activity", "DoD Education Activity"), - ("DoD Human Recourses Activity", "DoD Human Recourses Activity"), - ("DoD Inspector General", "DoD Inspector General"), - ("DoD Test Resource Management Center", "DoD Test Resource Management Center"), - ("Headquarters Defense Human Resource Activity ", "Headquarters Defense Human Resource Activity "), - ("Joint Staff", "Joint Staff"), - ("Missile Defense Agency", "Missile Defense Agency"), - ("National Defense University", "National Defense University"), - ("National Geospatial Intelligence Agency (NGA)", "National Geospatial Intelligence Agency (NGA)"), - ("National Oceanic and Atmospheric Administration (NOAA)", "National Oceanic and Atmospheric Administration (NOAA)"), - ("National Reconnaissance Office", "National Reconnaissance Office"), - ("National Reconnaissance Office (NRO)", "National Reconnaissance Office (NRO)"), - ("National Security Agency (NSA)", "National Security Agency (NSA)"), - ("National Security Agency-Central Security Service", "National Security Agency-Central Security Service"), - ("Navy, Department of the", "Navy, Department of the"), - ("Office of Economic Adjustment", "Office of Economic Adjustment"), - ("Office of the Secretary of Defense", "Office of the Secretary of Defense"), - ("Pentagon Force Protection Agency", "Pentagon Force Protection Agency"), - ("Uniform Services University of the Health Sciences", "Uniform Services University of the Health Sciences"), - ("US Cyber Command (USCYBERCOM)", "US Cyber Command (USCYBERCOM)"), - ("US Special Operations Command (USSOCOM)", "US Special Operations Command (USSOCOM)"), - ("US Strategic Command (USSTRATCOM)", "US Strategic Command (USSTRATCOM)"), - ("US Transportation Command (USTRANSCOM)", "US Transportation Command (USTRANSCOM)"), - ("Washington Headquarters Services", "Washington Headquarters Services"), - ], + choices=SERVICE_BRANCHES, validators=[Required()] )