From e9895219bbc2146cea975aa55a6c9dd211facc5a Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Mon, 26 Aug 2024 16:47:20 -0400 Subject: [PATCH 01/27] Enhance zip field, change alignment on td --- src/registrar/assets/sass/_theme/_tables.scss | 4 ++++ src/registrar/templates/domain_org_name_address.html | 2 +- src/registrar/templates/domain_request_org_contact.html | 2 +- src/registrar/templates/portfolio_organization.html | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/registrar/assets/sass/_theme/_tables.scss b/src/registrar/assets/sass/_theme/_tables.scss index e78715da8..88c960e1a 100644 --- a/src/registrar/assets/sass/_theme/_tables.scss +++ b/src/registrar/assets/sass/_theme/_tables.scss @@ -1,5 +1,9 @@ @use "uswds-core" as *; +td { + vertical-align: top; +} + .dotgov-table--stacked { td, th { padding: units(1) units(2) units(2px) 0; diff --git a/src/registrar/templates/domain_org_name_address.html b/src/registrar/templates/domain_org_name_address.html index 1e6176aa0..a7eb02b59 100644 --- a/src/registrar/templates/domain_org_name_address.html +++ b/src/registrar/templates/domain_org_name_address.html @@ -42,7 +42,7 @@ {% input_with_errors form.state_territory %} - {% with add_class="usa-input--small" %} + {% with add_class="usa-input--small" sublabel_text="Enter a zip code in the required format, like 12345 or 12345-6789." %} {% input_with_errors form.zipcode %} {% endwith %} diff --git a/src/registrar/templates/domain_request_org_contact.html b/src/registrar/templates/domain_request_org_contact.html index f145ee3bf..d4f3c2071 100644 --- a/src/registrar/templates/domain_request_org_contact.html +++ b/src/registrar/templates/domain_request_org_contact.html @@ -33,7 +33,7 @@ {% input_with_errors forms.0.state_territory %} - {% with add_class="usa-input--small" %} + {% with add_class="usa-input--small" sublabel_text="Enter a zip code in the required format, like 12345 or 12345-6789." %} {% input_with_errors forms.0.zipcode %} {% endwith %} diff --git a/src/registrar/templates/portfolio_organization.html b/src/registrar/templates/portfolio_organization.html index 51adba3d9..7fdce3908 100644 --- a/src/registrar/templates/portfolio_organization.html +++ b/src/registrar/templates/portfolio_organization.html @@ -41,7 +41,7 @@ {% input_with_errors form.address_line2 %} {% input_with_errors form.city %} {% input_with_errors form.state_territory %} - {% with add_class="usa-input--small" %} + {% with add_class="usa-input--small" sublabel_text="Enter a zip code in the required format, like 12345 or 12345-6789." %} {% input_with_errors form.zipcode %} {% endwith %} +
+ +
-
- -
{% endblock %} From b33d71f7be770deeb2cc91dc813ae5f02ed772a0 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 28 Aug 2024 13:05:35 -0400 Subject: [PATCH 06/27] fix skip nav on portfolio pages --- src/registrar/templates/no_portfolio_domains.html | 2 ++ src/registrar/templates/portfolio_base.html | 2 +- src/registrar/templates/portfolio_domains.html | 2 ++ src/registrar/templates/portfolio_organization.html | 2 +- src/registrar/templates/portfolio_requests.html | 2 ++ src/registrar/templates/portfolio_senior_official.html | 2 +- 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/no_portfolio_domains.html b/src/registrar/templates/no_portfolio_domains.html index d9a20b7dd..24612a627 100644 --- a/src/registrar/templates/no_portfolio_domains.html +++ b/src/registrar/templates/no_portfolio_domains.html @@ -5,6 +5,7 @@ {% block title %} Domains | {% endblock %} {% block portfolio_content %} +

Domains

@@ -27,4 +28,5 @@ {% endif %}
+
{% endblock %} diff --git a/src/registrar/templates/portfolio_base.html b/src/registrar/templates/portfolio_base.html index 2da33884c..843a34eb9 100644 --- a/src/registrar/templates/portfolio_base.html +++ b/src/registrar/templates/portfolio_base.html @@ -4,7 +4,7 @@
{% block content %} -
+
{% if user.is_authenticated %} {# the entire logged in page goes here #} diff --git a/src/registrar/templates/portfolio_domains.html b/src/registrar/templates/portfolio_domains.html index 84bbc1cf6..e54d0e2a8 100644 --- a/src/registrar/templates/portfolio_domains.html +++ b/src/registrar/templates/portfolio_domains.html @@ -5,6 +5,8 @@ {% block title %} Domains | {% endblock %} {% block portfolio_content %} +

Domains

{% include "includes/domains_table.html" with portfolio=portfolio user_domain_count=user_domain_count %} +
{% endblock %} diff --git a/src/registrar/templates/portfolio_organization.html b/src/registrar/templates/portfolio_organization.html index d5ecdfa4e..4ae035ad4 100644 --- a/src/registrar/templates/portfolio_organization.html +++ b/src/registrar/templates/portfolio_organization.html @@ -17,7 +17,7 @@ {% include 'portfolio_organization_sidebar.html' %}
-
+

Organization

diff --git a/src/registrar/templates/portfolio_requests.html b/src/registrar/templates/portfolio_requests.html index 8c698ec83..37d69f174 100644 --- a/src/registrar/templates/portfolio_requests.html +++ b/src/registrar/templates/portfolio_requests.html @@ -5,6 +5,7 @@ {% block title %} Domain requests | {% endblock %} {% block portfolio_content %} +

Domain requests

{% comment %} @@ -20,4 +21,5 @@

{% include "includes/domain_requests_table.html" with portfolio=portfolio %} +
{% endblock %} diff --git a/src/registrar/templates/portfolio_senior_official.html b/src/registrar/templates/portfolio_senior_official.html index 5c47e1645..26a081295 100644 --- a/src/registrar/templates/portfolio_senior_official.html +++ b/src/registrar/templates/portfolio_senior_official.html @@ -17,7 +17,7 @@ {% include 'portfolio_organization_sidebar.html' %}
-
+
{% include "includes/senior_official.html" with can_edit=False %}
From 4d28754b63f1e724572cc6ff9a6d598e4b85451f Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 28 Aug 2024 13:06:50 -0400 Subject: [PATCH 07/27] fix senior official title --- src/registrar/templates/portfolio_senior_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/portfolio_senior_official.html b/src/registrar/templates/portfolio_senior_official.html index 26a081295..6793587bd 100644 --- a/src/registrar/templates/portfolio_senior_official.html +++ b/src/registrar/templates/portfolio_senior_official.html @@ -1,7 +1,7 @@ {% extends 'portfolio_base.html' %} {% load static field_helpers%} -{% block title %}Senior Official | {{ portfolio.name }} | {% endblock %} +{% block title %}Senior Official | {{ portfolio.name }}{% endblock %} {% load static %} From b2ab1495ab5c8ed341f1d51134fa728a8044bb45 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 28 Aug 2024 13:09:02 -0400 Subject: [PATCH 08/27] fix senior official case --- src/registrar/forms/domain.py | 2 +- src/registrar/templates/includes/senior_official.html | 2 +- src/registrar/templates/portfolio_senior_official.html | 2 +- src/registrar/tests/test_api.py | 2 +- src/registrar/views/utility/api_views.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index a7a006788..84fcbe973 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -417,7 +417,7 @@ class SeniorOfficialContactForm(ContactForm): # This action should be blocked by the UI, as the text fields are readonly. # If they get past this point, we forbid it this way. # This could be malicious, so lets reserve information for the backend only. - raise ValueError("Senior Official cannot be modified for federal or tribal domains.") + raise ValueError("Senior official cannot be modified for federal or tribal domains.") elif db_so.has_more_than_one_join("information_senior_official"): # Handle the case where the domain information object is available and the SO Contact # has more than one joined object. diff --git a/src/registrar/templates/includes/senior_official.html b/src/registrar/templates/includes/senior_official.html index fda97b6a9..98afa4dec 100644 --- a/src/registrar/templates/includes/senior_official.html +++ b/src/registrar/templates/includes/senior_official.html @@ -4,7 +4,7 @@ {% include "includes/form_errors.html" with form=form %} {% endif %} -

Senior Official

+

Senior official

Your senior official is a person within your organization who can authorize domain requests. diff --git a/src/registrar/templates/portfolio_senior_official.html b/src/registrar/templates/portfolio_senior_official.html index 6793587bd..51ef83be5 100644 --- a/src/registrar/templates/portfolio_senior_official.html +++ b/src/registrar/templates/portfolio_senior_official.html @@ -1,7 +1,7 @@ {% extends 'portfolio_base.html' %} {% load static field_helpers%} -{% block title %}Senior Official | {{ portfolio.name }}{% endblock %} +{% block title %}Senior official | {{ portfolio.name }}{% endblock %} {% load static %} diff --git a/src/registrar/tests/test_api.py b/src/registrar/tests/test_api.py index 0025bc902..f6a14aad9 100644 --- a/src/registrar/tests/test_api.py +++ b/src/registrar/tests/test_api.py @@ -64,4 +64,4 @@ class GetSeniorOfficialJsonTest(TestCase): response = self.client.get(self.api_url, {"agency_name": "Non-Federal Agency"}) self.assertEqual(response.status_code, 404) data = response.json() - self.assertEqual(data["error"], "Senior Official not found") + self.assertEqual(data["error"], "Senior official not found") diff --git a/src/registrar/views/utility/api_views.py b/src/registrar/views/utility/api_views.py index 2c9414d1d..1e87e12e5 100644 --- a/src/registrar/views/utility/api_views.py +++ b/src/registrar/views/utility/api_views.py @@ -33,4 +33,4 @@ def get_senior_official_from_federal_agency_json(request): return JsonResponse(so_dict) else: - return JsonResponse({"error": "Senior Official not found"}, status=404) + return JsonResponse({"error": "Senior official not found"}, status=404) From 539824cfa389675635afbb12c32049085f364e94 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 28 Aug 2024 13:14:39 -0400 Subject: [PATCH 09/27] Fix double id bug on combobox --- src/registrar/templates/django/forms/widgets/combobox.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/registrar/templates/django/forms/widgets/combobox.html b/src/registrar/templates/django/forms/widgets/combobox.html index 107c2e14e..7ff31945b 100644 --- a/src/registrar/templates/django/forms/widgets/combobox.html +++ b/src/registrar/templates/django/forms/widgets/combobox.html @@ -7,7 +7,9 @@ for now we just carry the attribute to both the parent element and the select.

{% include "django/forms/widgets/select.html" %} From f1b93b729b23942a8b04cab31b46500cc88ed4d8 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 28 Aug 2024 13:38:31 -0400 Subject: [PATCH 10/27] customize backgrounds on portfolio templates --- src/registrar/assets/sass/_theme/_base.scss | 5 ++++- src/registrar/templates/portfolio_base.html | 8 +++----- src/registrar/templates/portfolio_domains.html | 4 ++++ src/registrar/templates/portfolio_requests.html | 4 ++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/registrar/assets/sass/_theme/_base.scss b/src/registrar/assets/sass/_theme/_base.scss index 9f8a0cbb6..ec145365a 100644 --- a/src/registrar/assets/sass/_theme/_base.scss +++ b/src/registrar/assets/sass/_theme/_base.scss @@ -33,10 +33,13 @@ body { } #wrapper.dashboard--portfolio { - background-color: color('gray-1'); padding-top: units(4)!important; } +#wrapper.dashboard--grey-1 { + background-color: color('gray-1'); +} + .section--outlined { background-color: color('white'); diff --git a/src/registrar/templates/portfolio_base.html b/src/registrar/templates/portfolio_base.html index 843a34eb9..f6b97afbc 100644 --- a/src/registrar/templates/portfolio_base.html +++ b/src/registrar/templates/portfolio_base.html @@ -1,8 +1,8 @@ {% extends "base.html" %} {% block wrapper %} -
- {% block content %} +
+ {% block content %}
{% if user.is_authenticated %} @@ -26,10 +26,8 @@ {% endif %}
- {% endblock %} - + {% endblock content%}
{% block complementary %}{% endblock %}
- {% block content_bottom %}{% endblock %}
{% endblock wrapper %} diff --git a/src/registrar/templates/portfolio_domains.html b/src/registrar/templates/portfolio_domains.html index e54d0e2a8..51011a1a6 100644 --- a/src/registrar/templates/portfolio_domains.html +++ b/src/registrar/templates/portfolio_domains.html @@ -4,6 +4,10 @@ {% block title %} Domains | {% endblock %} +{% block wrapper_class %} + {{ block.super }} dashboard--grey-1 +{% endblock %} + {% block portfolio_content %}

Domains

diff --git a/src/registrar/templates/portfolio_requests.html b/src/registrar/templates/portfolio_requests.html index 37d69f174..9f97a25aa 100644 --- a/src/registrar/templates/portfolio_requests.html +++ b/src/registrar/templates/portfolio_requests.html @@ -4,6 +4,10 @@ {% block title %} Domain requests | {% endblock %} +{% block wrapper_class %} + {{ block.super }} dashboard--grey-1 +{% endblock %} + {% block portfolio_content %}

Domain requests

From 0c57dc55e7db1288de21710d75058b1f590c12a5 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 28 Aug 2024 13:43:03 -0400 Subject: [PATCH 11/27] Fix unit test --- src/registrar/tests/test_views_domain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/tests/test_views_domain.py b/src/registrar/tests/test_views_domain.py index 3a90543a2..fc99adae9 100644 --- a/src/registrar/tests/test_views_domain.py +++ b/src/registrar/tests/test_views_domain.py @@ -1128,7 +1128,7 @@ class TestDomainSeniorOfficial(TestDomainOverview): def test_domain_senior_official(self): """Can load domain's senior official page.""" page = self.client.get(reverse("domain-senior-official", kwargs={"pk": self.domain.id})) - self.assertContains(page, "Senior official", count=3) + self.assertContains(page, "Senior official", count=4) @less_console_noise_decorator def test_domain_senior_official_content(self): From fe898f3168ded5cddd858248e292eaa1c34ce5b8 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Thu, 29 Aug 2024 00:12:03 -0400 Subject: [PATCH 12/27] Suborg title --- src/registrar/templates/domain_suborganization.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_suborganization.html b/src/registrar/templates/domain_suborganization.html index 42bb766a3..38e67c488 100644 --- a/src/registrar/templates/domain_suborganization.html +++ b/src/registrar/templates/domain_suborganization.html @@ -1,7 +1,7 @@ {% extends "domain_base.html" %} {% load static field_helpers%} -{% block title %}Suborganization{% endblock %} +{% block title %}Suborganization{% if suborganization_name %} | suborganization_name{% endif %}{% endblock %} {% block domain_content %} {# this is right after the messages block in the parent template #} From 4a9cf02918756f99b351ceb25c40df45dfa0c992 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Thu, 29 Aug 2024 12:51:50 -0400 Subject: [PATCH 13/27] title on domain suborg --- src/registrar/templates/domain_suborganization.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_suborganization.html b/src/registrar/templates/domain_suborganization.html index 38e67c488..412878960 100644 --- a/src/registrar/templates/domain_suborganization.html +++ b/src/registrar/templates/domain_suborganization.html @@ -1,7 +1,7 @@ {% extends "domain_base.html" %} {% load static field_helpers%} -{% block title %}Suborganization{% if suborganization_name %} | suborganization_name{% endif %}{% endblock %} +{% block title %}Suborganization{% if suborganization_name %} | suborganization_name{% endif %} | {% endblock %} {% block domain_content %} {# this is right after the messages block in the parent template #} From 9ff733819f54dab0410794e7c9cc662f31c2fc9c Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Thu, 29 Aug 2024 13:11:37 -0400 Subject: [PATCH 14/27] suborg table display tweaks --- src/registrar/assets/js/get-gov.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/registrar/assets/js/get-gov.js b/src/registrar/assets/js/get-gov.js index 486b084f5..6141b504b 100644 --- a/src/registrar/assets/js/get-gov.js +++ b/src/registrar/assets/js/get-gov.js @@ -1220,7 +1220,7 @@ document.addEventListener('DOMContentLoaded', function() { const expirationDateFormatted = expirationDate ? expirationDate.toLocaleDateString('en-US', options) : ''; const expirationDateSortValue = expirationDate ? expirationDate.getTime() : ''; const actionUrl = domain.action_url; - const suborganization = domain.suborganization ? domain.suborganization : ''; + const suborganization = domain.suborganization ? domain.suborganization : '⎯'; const row = document.createElement('tr'); @@ -1229,7 +1229,7 @@ document.addEventListener('DOMContentLoaded', function() { if (!noPortfolioFlag) { markupForSuborganizationRow = ` - ${suborganization} + ${suborganization} ` } @@ -2043,11 +2043,19 @@ document.addEventListener('DOMContentLoaded', function() { // Due to the nature of how uswds works, this is slightly hacky. // Use a MutationObserver to watch for changes in the dropdown list - const dropdownList = document.querySelector(`#${input.id}--list`); + const dropdownList = comboBox.querySelector(`#${input.id}--list`); + // TODO: customize blank value + // const isSuborgComboBox = comboBox.querySelector('#id_sub_organization--list'); const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.type === "childList") { - addBlankOption(clearInputButton, dropdownList, initialValue); + // TODO: customize blank value + // if (isSuborgComboBox) { + // addBlankOption(clearInputButton, dropdownList, initialValue, 'No suborganization'); + // } else { + // addBlankOption(clearInputButton, dropdownList, initialValue); + // } + addBlankOption(clearInputButton, dropdownList, initialValue); } }); }); @@ -2102,6 +2110,8 @@ document.addEventListener('DOMContentLoaded', function() { } } + // TODO: customize blank value + // function addBlankOption(clearInputButton, dropdownList, initialValue, customBlank) { function addBlankOption(clearInputButton, dropdownList, initialValue) { if (dropdownList && !dropdownList.querySelector('[data-value=""]') && !isTyping) { const blankOption = document.createElement("li"); @@ -2111,7 +2121,9 @@ document.addEventListener('DOMContentLoaded', function() { if (!initialValue){ blankOption.classList.add("usa-combo-box__list-option--selected") } - blankOption.textContent = "---------"; + // TODO: customize blank value + // customBlank ? blankOption.textContent = customBlank : blankOption.textContent = "---------"; + blankOption.textContent = "⎯"; dropdownList.insertBefore(blankOption, dropdownList.firstChild); blankOption.addEventListener("click", (e) => { From 141037170dd8f22d2afa5fe49ba0c66d65d96d31 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Thu, 29 Aug 2024 18:01:14 -0400 Subject: [PATCH 15/27] change border color on org tables --- src/registrar/assets/sass/_theme/_base.scss | 18 +++++++++++------- src/registrar/templates/domain_users.html | 4 ++-- .../includes/domain_requests_table.html | 2 +- .../templates/includes/domains_table.html | 8 ++++---- .../templates/no_portfolio_domains.html | 4 ++-- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/registrar/assets/sass/_theme/_base.scss b/src/registrar/assets/sass/_theme/_base.scss index ec145365a..71b1bfa27 100644 --- a/src/registrar/assets/sass/_theme/_base.scss +++ b/src/registrar/assets/sass/_theme/_base.scss @@ -41,7 +41,7 @@ body { } -.section--outlined { +.section-outlined { background-color: color('white'); border: 1px solid color('base-lighter'); border-radius: 4px; @@ -75,9 +75,13 @@ body { } } -.section--outlined__header--no-portfolio { - .section--outlined__search, - .section--outlined__utility-button { +.section-outlined--border-base-light { + border: 1px solid color('base-light'); +} + +.section-outlined__header--no-portfolio { + .section-outlined__search, + .section-outlined__utility-button { margin-top: units(2); } @@ -85,11 +89,11 @@ body { display: flex; column-gap: units(3); - .section--outlined__search, - .section--outlined__utility-button { + .section-outlined__search, + .section-outlined__utility-button { margin-top: 0; } - .section--outlined__search { + .section-outlined__search { flex-grow: 4; // Align right max-width: 383px; diff --git a/src/registrar/templates/domain_users.html b/src/registrar/templates/domain_users.html index 8e4f04fcd..412f4ee73 100644 --- a/src/registrar/templates/domain_users.html +++ b/src/registrar/templates/domain_users.html @@ -21,7 +21,7 @@ {% if domain.permissions %} -
+

Domain managers

@@ -112,7 +112,7 @@ {% if domain.invitations.exists %} -
+

Invitations

Domain managers
diff --git a/src/registrar/templates/includes/domain_requests_table.html b/src/registrar/templates/includes/domain_requests_table.html index 487c1cee5..9ad49c50d 100644 --- a/src/registrar/templates/includes/domain_requests_table.html +++ b/src/registrar/templates/includes/domain_requests_table.html @@ -3,7 +3,7 @@ {% comment %} Stores the json endpoint in a url for easier access {% endcomment %} {% url 'get_domain_requests_json' as url %} -
+
{% if not has_domain_requests_portfolio_permission %}
diff --git a/src/registrar/templates/includes/domains_table.html b/src/registrar/templates/includes/domains_table.html index d3d7317f2..92217530d 100644 --- a/src/registrar/templates/includes/domains_table.html +++ b/src/registrar/templates/includes/domains_table.html @@ -5,8 +5,8 @@ {% comment %} Stores the json endpoint in a url for easier access {% endcomment %} {% url 'get_domains_json' as url %} -
-
+
+
{% if not portfolio %}

Domains

@@ -14,7 +14,7 @@ {% endif %} -
Domain invitations