diff --git a/src/registrar/assets/js/get-gov.js b/src/registrar/assets/js/get-gov.js index 5fe824b2b..f6b087743 100644 --- a/src/registrar/assets/js/get-gov.js +++ b/src/registrar/assets/js/get-gov.js @@ -2786,9 +2786,10 @@ document.addEventListener('DOMContentLoaded', function() { const radioFieldset = document.getElementById(`id_${formPrefix}-requesting_entity_is_suborganization__fieldset`); const radios = radioFieldset?.querySelectorAll(`input[name="${formPrefix}-requesting_entity_is_suborganization"]`); const select = document.getElementById(`id_${formPrefix}-sub_organization`); + const selectParent = select?.parentElement; const suborgContainer = document.getElementById("suborganization-container"); const suborgDetailsContainer = document.getElementById("suborganization-container__details"); - if (!radios || !select || !suborgContainer || !suborgDetailsContainer) return; + if (!radios || !select || !selectParent || !suborgContainer || !suborgDetailsContainer) return; // requestingSuborganization: This just broadly determines if they're requesting a suborg at all // requestingNewSuborganization: This variable determines if the user is trying to *create* a new suborganization or not. @@ -2799,6 +2800,14 @@ document.addEventListener('DOMContentLoaded', function() { if (radio != null) requestingSuborganization = radio?.checked && radio.value === "True"; requestingSuborganization ? showElement(suborgContainer) : hideElement(suborgContainer); requestingNewSuborganization.value = requestingSuborganization && select.value === "other" ? "True" : "False"; + + if (requestingNewSuborganization.value === "True") { + selectParent.classList.add("padding-bottom-2"); + showElement(suborgDetailsContainer); + }else { + selectParent.classList.remove("padding-bottom-2"); + hideElement(suborgDetailsContainer); + } requestingNewSuborganization.value === "True" ? showElement(suborgDetailsContainer) : hideElement(suborgDetailsContainer); } diff --git a/src/registrar/assets/sass/_theme/_base.scss b/src/registrar/assets/sass/_theme/_base.scss index 442c5c862..891f950e6 100644 --- a/src/registrar/assets/sass/_theme/_base.scss +++ b/src/registrar/assets/sass/_theme/_base.scss @@ -38,10 +38,6 @@ body { padding-top: units(5)!important; } -#wrapper.dashboard--portfolio { - padding-top: units(4)!important; -} - #wrapper.dashboard--grey-1 { background-color: color('gray-1'); } diff --git a/src/registrar/forms/domain_request_wizard.py b/src/registrar/forms/domain_request_wizard.py index 4b9ca88b1..da82cb831 100644 --- a/src/registrar/forms/domain_request_wizard.py +++ b/src/registrar/forms/domain_request_wizard.py @@ -119,7 +119,10 @@ class RequestingEntityForm(RegistrarForm): if not cleaned_data.get("suborganization_city"): self.add_error("suborganization_city", "Enter the city where your suborganization is located.") if not cleaned_data.get("suborganization_state_territory"): - self.add_error("suborganization_state_territory", "Select the state, territory, or military post where your suborganization is located.") + self.add_error( + "suborganization_state_territory", + "Select the state, territory, or military post where your suborganization is located.", + ) elif not suborganization: self.add_error("sub_organization", "Suborganization is required.") diff --git a/src/registrar/templates/domain_request_requesting_entity.html b/src/registrar/templates/domain_request_requesting_entity.html index eaf2d5a31..3dac6a974 100644 --- a/src/registrar/templates/domain_request_requesting_entity.html +++ b/src/registrar/templates/domain_request_requesting_entity.html @@ -33,8 +33,8 @@

Add suborganization information

- This information will be published in .gov’s public data. If you don’t see your suborganization in the list, - select “other”. + This information will be published in .gov’s public data. If you don’t see your suborganization in the list, + select “other.”

{% with attr_required=True %} {% input_with_errors forms.1.sub_organization %} diff --git a/src/registrar/templates/portfolio_base.html b/src/registrar/templates/portfolio_base.html index 86e43c962..1963d7cca 100644 --- a/src/registrar/templates/portfolio_base.html +++ b/src/registrar/templates/portfolio_base.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block wrapper %} -
+
{% block content %}
diff --git a/src/registrar/templates/portfolio_no_domains.html b/src/registrar/templates/portfolio_no_domains.html index 75ff3a91f..ac6a8c036 100644 --- a/src/registrar/templates/portfolio_no_domains.html +++ b/src/registrar/templates/portfolio_no_domains.html @@ -18,7 +18,7 @@

You aren’t managing any domains.

{% if portfolio_administrators %}

If you believe you should have access to a domain, reach out to your organization’s administrators.

-

Your organizations administrators:

+

Your organization's administrators:

    {% for administrator in portfolio_administrators %} {% if administrator.email %} diff --git a/src/registrar/tests/test_views_portfolio.py b/src/registrar/tests/test_views_portfolio.py index d1250dfeb..92ac387ba 100644 --- a/src/registrar/tests/test_views_portfolio.py +++ b/src/registrar/tests/test_views_portfolio.py @@ -1794,9 +1794,13 @@ class TestRequestingEntity(WebTest): form["portfolio_requesting_entity-is_requesting_new_suborganization"] = True response = form.submit() self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id) - self.assertContains(response, "Requested suborganization is required.", status_code=200) - self.assertContains(response, "City is required.", status_code=200) - self.assertContains(response, "State, territory, or military post is required.", status_code=200) + self.assertContains(response, "Enter the name of your suborganization.", status_code=200) + self.assertContains(response, "Enter the city where your suborganization is located.", status_code=200) + self.assertContains( + response, + "Select the state, territory, or military post where your suborganization is located.", + status_code=200, + ) @override_flag("organization_feature", active=True) @override_flag("organization_requests", active=True)