diff --git a/src/registrar/assets/src/js/getgov/requesting-entity.js b/src/registrar/assets/src/js/getgov/requesting-entity.js index 5f3be8c79..833eab2f8 100644 --- a/src/registrar/assets/src/js/getgov/requesting-entity.js +++ b/src/registrar/assets/src/js/getgov/requesting-entity.js @@ -15,7 +15,6 @@ export function handleRequestingEntityFieldset() { const suborgContainer = document.getElementById("suborganization-container"); const suborgDetailsContainer = document.getElementById("suborganization-container__details"); const suborgAddtlInstruction = document.getElementById("suborganization-addtl-instruction"); - const subOrgCreateNewOption = document.getElementById("option-to-add-suborg")?.value; // Make sure all crucial page elements exist before proceeding. // This more or less ensures that we are on the Requesting Entity page, and not elsewhere. if (!radios || !input || !select || !inputGrandParent || !suborgContainer || !suborgDetailsContainer) return; @@ -28,7 +27,7 @@ export function handleRequestingEntityFieldset() { function toggleSuborganization(radio=null) { if (radio != null) requestingSuborganization = radio?.checked && radio.value === "True"; requestingSuborganization ? showElement(suborgContainer) : hideElement(suborgContainer); - if (select.options.length == 2) { // --Select-- and other are the only options + if (select.options.length == 1) { // other is the only option hideElement(inputGrandParent); // Hide the combo box and indicate requesting new suborg hideElement(suborgAddtlInstruction); // Hide additional instruction related to the list requestingNewSuborganization.value = "True"; diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index b3dae0d3a..5eeae232d 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -450,7 +450,6 @@ class DomainOrgNameAddressForm(forms.ModelForm): label="Federal agency", required=False, queryset=FederalAgency.objects.all(), - empty_label="--Select--", widget=ComboboxWidget, ) zipcode = forms.CharField( @@ -469,7 +468,7 @@ class DomainOrgNameAddressForm(forms.ModelForm): state_territory = forms.ChoiceField( label="State, territory, or military post", required=True, - choices=[("", "--Select--")] + DomainInformation.StateTerritoryChoices.choices, + choices=DomainInformation.StateTerritoryChoices.choices, error_messages={ "required": ("Select the state, territory, or military post where your organization is located.") }, diff --git a/src/registrar/forms/domain_request_wizard.py b/src/registrar/forms/domain_request_wizard.py index 12d3b74bf..7f80c9d34 100644 --- a/src/registrar/forms/domain_request_wizard.py +++ b/src/registrar/forms/domain_request_wizard.py @@ -44,7 +44,6 @@ class RequestingEntityForm(RegistrarForm): label="Suborganization name", required=False, queryset=Suborganization.objects.none(), - empty_label="--Select--", widget=ComboboxWidget, ) requested_suborganization = forms.CharField( @@ -58,7 +57,7 @@ class RequestingEntityForm(RegistrarForm): suborganization_state_territory = forms.ChoiceField( label="State, territory, or military post", required=False, - choices=[("", "--Select--")] + DomainRequest.StateTerritoryChoices.choices, + choices=DomainRequest.StateTerritoryChoices.choices, widget=ComboboxWidget, ) @@ -74,8 +73,7 @@ class RequestingEntityForm(RegistrarForm): # Modify the choices to include "other" so that form can display options properly self.fields["sub_organization"].choices = ( - [("", "--Select--")] - + [(obj.id, str(obj)) for obj in queryset] + [(obj.id, str(obj)) for obj in queryset] + [("other", "Other (enter your suborganization manually)")] ) @@ -328,7 +326,6 @@ class OrganizationContactForm(RegistrarForm): # uncomment to see if modelChoiceField can be an arg later required=False, queryset=FederalAgency.objects.exclude(agency__in=excluded_agencies), - empty_label="--Select--", widget=ComboboxWidget, ) organization_name = forms.CharField( @@ -349,7 +346,7 @@ class OrganizationContactForm(RegistrarForm): ) state_territory = forms.ChoiceField( label="State, territory, or military post", - choices=[("", "--Select--")] + DomainRequest.StateTerritoryChoices.choices, + choices=DomainRequest.StateTerritoryChoices.choices, error_messages={ "required": ("Select the state, territory, or military post where your organization is located.") }, diff --git a/src/registrar/forms/portfolio.py b/src/registrar/forms/portfolio.py index 13d956fe4..9d6c9ecdf 100644 --- a/src/registrar/forms/portfolio.py +++ b/src/registrar/forms/portfolio.py @@ -37,7 +37,7 @@ class PortfolioOrgAddressForm(forms.ModelForm): state_territory = forms.ChoiceField( label="State, territory, or military post", required=True, - choices=[("", "--Select--")] + DomainInformation.StateTerritoryChoices.choices, + choices=DomainInformation.StateTerritoryChoices.choices, error_messages={ "required": ("Select the state, territory, or military post where your organization is located.") },