From 96a13040bf416edfafef32e9059044b50a863ede Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Fri, 19 Jan 2024 06:47:01 -0500 Subject: [PATCH 01/12] updated application review page and application summary in emails --- src/registrar/templates/application_review.html | 15 ++++++++++----- .../emails/includes/application_summary.txt | 5 +++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html index 974830e91..dd2507d1b 100644 --- a/src/registrar/templates/application_review.html +++ b/src/registrar/templates/application_review.html @@ -78,11 +78,16 @@ - + {% if application.alternative_domains.all %} +
+

Alternative domains

+ +
+ {% endif %} {% endif %} {% if step == Step.PURPOSE %} {{ application.purpose|default:"Incomplete" }} diff --git a/src/registrar/templates/emails/includes/application_summary.txt b/src/registrar/templates/emails/includes/application_summary.txt index c628e1074..fda62b63a 100644 --- a/src/registrar/templates/emails/includes/application_summary.txt +++ b/src/registrar/templates/emails/includes/application_summary.txt @@ -21,9 +21,10 @@ Current website for your organization: {% for site in application.current_websit {% spaceless %}{{ site.website }}{% endspaceless %} {% endfor %}{% endif %} .gov domain: -{{ application.requested_domain.name }} +{{ application.requested_domain.name }}{% if application.alternative_domains.all %} +Alternative domains: {% for site in application.alternative_domains.all %}{% spaceless %}{{ site.website }}{% endspaceless %} -{% endfor %} +{% endfor %}{% endif %} Purpose of your domain: {{ application.purpose }} From 71ac6d8a9bdaa7353b10bc20ab79d1a217dcad6c Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Fri, 19 Jan 2024 07:37:18 -0500 Subject: [PATCH 02/12] proper spacing in email --- src/registrar/templates/emails/includes/application_summary.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/registrar/templates/emails/includes/application_summary.txt b/src/registrar/templates/emails/includes/application_summary.txt index fda62b63a..770bf0eef 100644 --- a/src/registrar/templates/emails/includes/application_summary.txt +++ b/src/registrar/templates/emails/includes/application_summary.txt @@ -22,6 +22,7 @@ Current website for your organization: {% for site in application.current_websit {% endfor %}{% endif %} .gov domain: {{ application.requested_domain.name }}{% if application.alternative_domains.all %} + Alternative domains: {% for site in application.alternative_domains.all %}{% spaceless %}{{ site.website }}{% endspaceless %} {% endfor %}{% endif %} From 15569e08f7c87a2c155d70b132081b1ccafa300b Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Fri, 19 Jan 2024 07:59:08 -0500 Subject: [PATCH 03/12] further fixed spacing in emails, and corrected unit tests --- .../templates/emails/includes/application_summary.txt | 4 ++-- src/registrar/tests/test_emails.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/emails/includes/application_summary.txt b/src/registrar/templates/emails/includes/application_summary.txt index 770bf0eef..f6cc80dfa 100644 --- a/src/registrar/templates/emails/includes/application_summary.txt +++ b/src/registrar/templates/emails/includes/application_summary.txt @@ -21,8 +21,8 @@ Current website for your organization: {% for site in application.current_websit {% spaceless %}{{ site.website }}{% endspaceless %} {% endfor %}{% endif %} .gov domain: -{{ application.requested_domain.name }}{% if application.alternative_domains.all %} - +{{ application.requested_domain.name }} +{% if application.alternative_domains.all %} Alternative domains: {% for site in application.alternative_domains.all %}{% spaceless %}{{ site.website }}{% endspaceless %} {% endfor %}{% endif %} diff --git a/src/registrar/tests/test_emails.py b/src/registrar/tests/test_emails.py index 61c950255..c6039da93 100644 --- a/src/registrar/tests/test_emails.py +++ b/src/registrar/tests/test_emails.py @@ -117,7 +117,7 @@ class TestEmails(TestCase): body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"] self.assertIn("city1.gov", body) # spacing should be right between adjacent elements - self.assertRegex(body, r"city.gov\ncity1.gov\n\nPurpose of your domain:") + self.assertRegex(body, r"city.gov\n\nAlternative domains:\ncity1.gov\n\nPurpose of your domain:") @boto3_mocking.patching def test_submission_confirmation_no_alternative_govdomain_spacing(self): From 19c72b18582bd0ef4141c0120cc4ef18ec926cc3 Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Tue, 23 Jan 2024 14:01:36 -0500 Subject: [PATCH 04/12] incremental update to html --- .../templates/application_review.html | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html index dd2507d1b..057df6380 100644 --- a/src/registrar/templates/application_review.html +++ b/src/registrar/templates/application_review.html @@ -29,10 +29,10 @@ {% if step == Step.ORGANIZATION_TYPE %} {% if application.organization_type is not None %} {% with long_org_type=application.organization_type|get_organization_long_name %} - {{ long_org_type }} +

{{ long_org_type }}

{% endwith %} {% else %} - Incomplete +

Incomplete

{% endif %} {% endif %} {% if step == Step.TRIBAL_GOVERNMENT %} @@ -41,16 +41,16 @@ {% if application.state_recognized_tribe %}

State-recognized tribe

{% endif %} {% endif %} {% if step == Step.ORGANIZATION_FEDERAL %} - {{ application.get_federal_type_display|default:"Incomplete" }} +

{{ application.get_federal_type_display|default:"Incomplete" }}

{% endif %} {% if step == Step.ORGANIZATION_ELECTION %} - {{ application.is_election_board|yesno:"Yes,No,Incomplete" }} +

{{ application.is_election_board|yesno:"Yes,No,Incomplete" }}

{% endif %} {% if step == Step.ORGANIZATION_CONTACT %} {% if application.organization_name %} {% include "includes/organization_address.html" with organization=application %} {% else %} - Incomplete +

Incomplete

{% endif %} {% endif %} {% if step == Step.ABOUT_YOUR_ORGANIZATION %} @@ -62,7 +62,7 @@ {% include "includes/contact.html" with contact=application.authorizing_official %} {% else %} - Incomplete +

Incomplete

{% endif %} {% endif %} {% if step == Step.CURRENT_SITES %} @@ -90,7 +90,7 @@ {% endif %} {% endif %} {% if step == Step.PURPOSE %} - {{ application.purpose|default:"Incomplete" }} +

{{ application.purpose|default:"Incomplete" }}

{% endif %} {% if step == Step.YOUR_CONTACT %} {% if application.submitter %} @@ -98,7 +98,7 @@ {% include "includes/contact.html" with contact=application.submitter %} {% else %} - Incomplete +

Incomplete

{% endif %} {% endif %} {% if step == Step.OTHER_CONTACTS %} @@ -110,15 +110,15 @@ {% empty %}

No other employees from your organization?

- {{ application.no_other_contacts_rationale|default:"Incomplete" }} +

{{ application.no_other_contacts_rationale|default:"Incomplete" }}

{% endfor %} {% endif %} {% if step == Step.ANYTHING_ELSE %} - {{ application.anything_else|default:"No" }} +

{{ application.anything_else|default:"No" }}

{% endif %} {% if step == Step.REQUIREMENTS %} - {{ application.is_policy_acknowledged|yesno:"I agree.,I do not agree.,I do not agree." }} +

{{ application.is_policy_acknowledged|yesno:"I agree.,I do not agree.,I do not agree." }}

{% endif %} From 37c8c2b05e09be1a0648b06a17cd8ef44d24fd94 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Tue, 23 Jan 2024 15:39:09 -0500 Subject: [PATCH 05/12] refactor application_review to use summary_item --- .../assets/sass/_theme/_register-form.scss | 2 +- .../templates/application_review.html | 239 +++++++++++------- .../templates/includes/summary_item.html | 6 +- 3 files changed, 147 insertions(+), 100 deletions(-) diff --git a/src/registrar/assets/sass/_theme/_register-form.scss b/src/registrar/assets/sass/_theme/_register-form.scss index 6d268d155..8332d17ae 100644 --- a/src/registrar/assets/sass/_theme/_register-form.scss +++ b/src/registrar/assets/sass/_theme/_register-form.scss @@ -12,7 +12,7 @@ margin-top: units(1); } -.register-form-step h3 { +.register-form-step h3:not(.text-base-darker) { color: color('primary-dark'); letter-spacing: $letter-space--xs; margin-top: units(3); diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html index 057df6380..8efd9967d 100644 --- a/src/registrar/templates/application_review.html +++ b/src/registrar/templates/application_review.html @@ -20,113 +20,158 @@ {% block form_fields %} {% for step in steps.all|slice:":-1" %} -
-
-
-
-
{{ form_titles|get_item:step }}
-
- {% if step == Step.ORGANIZATION_TYPE %} - {% if application.organization_type is not None %} - {% with long_org_type=application.organization_type|get_organization_long_name %} -

{{ long_org_type }}

- {% endwith %} - {% else %} -

Incomplete

- {% endif %} +
+ + {% if step == Step.ORGANIZATION_TYPE %} + {% namespaced_url 'application' step as application_url %} + {% if application.organization_type is not None %} + {% with title=form_titles|get_item:step value=application.organization_type|get_organization_long_name|default:"Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} + {% else %} + {% with title=form_titles|get_item:step value="Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} {% endif %} - {% if step == Step.TRIBAL_GOVERNMENT %} - {{ application.tribe_name|default:"Incomplete" }} - {% if application.federally_recognized_tribe %}

Federally-recognized tribe

{% endif %} - {% if application.state_recognized_tribe %}

State-recognized tribe

{% endif %} + {% endif %} + + {% if step == Step.TRIBAL_GOVERNMENT %} + {% namespaced_url 'application' step as application_url %} + {% with title=form_titles|get_item:step value=application.tribe_name|default:"Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} + {% if application.federally_recognized_tribe %}

Federally-recognized tribe

{% endif %} + {% if application.state_recognized_tribe %}

State-recognized tribe

{% endif %} + {% endif %} + + + {% if step == Step.ORGANIZATION_FEDERAL %} + {% namespaced_url 'application' step as application_url %} + {% with title=form_titles|get_item:step value=application.get_federal_type_display|default:"Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} + {% endif %} + + {% if step == Step.ORGANIZATION_ELECTION %} + {% namespaced_url 'application' step as application_url %} + {% with title=form_titles|get_item:step value=application.is_election_board|yesno:"Yes,No,Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} + {% endif %} + + {% if step == Step.ORGANIZATION_CONTACT %} + {% namespaced_url 'application' step as application_url %} + {% if application.organization_name %} + {% with title=form_titles|get_item:step value=application %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url address='true' %} + {% endwith %} + {% else %} + {% with title=form_titles|get_item:step value='Incomplete' %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} {% endif %} - {% if step == Step.ORGANIZATION_FEDERAL %} -

{{ application.get_federal_type_display|default:"Incomplete" }}

+ {% endif %} + + {% if step == Step.ABOUT_YOUR_ORGANIZATION %} + {% namespaced_url 'application' step as application_url %} + {% with title=form_titles|get_item:step value=application.about_your_organization|default:"Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} + {% endif %} + + {% if step == Step.AUTHORIZING_OFFICIAL %} + {% namespaced_url 'application' step as application_url %} + {% if application.authorizing_official is not None %} + {% with title=form_titles|get_item:step value=application.authorizing_official %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url contact='true' %} + {% endwith %} + {% else %} + {% with title=form_titles|get_item:step value="Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} {% endif %} - {% if step == Step.ORGANIZATION_ELECTION %} -

{{ application.is_election_board|yesno:"Yes,No,Incomplete" }}

+ {% endif %} + + {% if step == Step.CURRENT_SITES %} + {% namespaced_url 'application' step as application_url %} + {% if application.alternative_domains.all %} + {% with title=form_titles|get_item:step value=application.current_websites.all %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url list='true' %} + {% endwith %} + {% else %} + {% with title=form_titles|get_item:step value='None' %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} {% endif %} - {% if step == Step.ORGANIZATION_CONTACT %} - {% if application.organization_name %} - {% include "includes/organization_address.html" with organization=application %} - {% else %} -

Incomplete

- {% endif %} - {% endif %} - {% if step == Step.ABOUT_YOUR_ORGANIZATION %} -

{{ application.about_your_organization|default:"Incomplete" }}

- {% endif %} - {% if step == Step.AUTHORIZING_OFFICIAL %} - {% if application.authorizing_official %} -
- {% include "includes/contact.html" with contact=application.authorizing_official %} -
- {% else %} -

Incomplete

- {% endif %} - {% endif %} - {% if step == Step.CURRENT_SITES %} -
    - {% for site in application.current_websites.all %} + {% endif %} + + {% if step == Step.DOTGOV_DOMAIN %} + {% namespaced_url 'application' step as application_url %} + {% with title=form_titles|get_item:step value=application.requested_domain.name|default:"Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} + + {% if application.alternative_domains.all %} +

    Alternative domains

    +
      + {% for site in application.alternative_domains.all %}
    • {{ site.website }}
    • - {% empty %} -
    • None
    • {% endfor %}
    {% endif %} - {% if step == Step.DOTGOV_DOMAIN %} -
      -
    • {{ application.requested_domain.name|default:"Incomplete" }}
    • -
    - {% if application.alternative_domains.all %} -
    -

    Alternative domains

    -
      - {% for site in application.alternative_domains.all %} -
    • {{ site.website }}
    • - {% endfor %} -
    -
    - {% endif %} + {% endif %} + + {% if step == Step.PURPOSE %} + {% namespaced_url 'application' step as application_url %} + {% with title=form_titles|get_item:step value=application.purpose|default:"Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} + {% endif %} + + {% if step == Step.YOUR_CONTACT %} + {% namespaced_url 'application' step as application_url %} + {% if application.submitter is not None %} + {% with title=form_titles|get_item:step value=application.submitter %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url contact='true' %} + {% endwith %} + {% else %} + {% with title=form_titles|get_item:step value="Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} {% endif %} - {% if step == Step.PURPOSE %} -

    {{ application.purpose|default:"Incomplete" }}

    + {% endif %} + + {% if step == Step.OTHER_CONTACTS %} + {% namespaced_url 'application' step as application_url %} + {% if application.other_contacts.all %} + {% with title=form_titles|get_item:step value=application.other_contacts.all %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url contact='true' list='true' %} + {% endwith %} + {% else %} + {% with title=form_titles|get_item:step value=application.no_other_contacts_rationale|default:"Incomplete" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} {% endif %} - {% if step == Step.YOUR_CONTACT %} - {% if application.submitter %} -
    - {% include "includes/contact.html" with contact=application.submitter %} -
    - {% else %} -

    Incomplete

    - {% endif %} - {% endif %} - {% if step == Step.OTHER_CONTACTS %} - {% for other in application.other_contacts.all %} -
    -

    Contact {{ forloop.counter }}

    - {% include "includes/contact.html" with contact=other %} -
    - {% empty %} -
    -

    No other employees from your organization?

    -

    {{ application.no_other_contacts_rationale|default:"Incomplete" }}

    -
    - {% endfor %} - {% endif %} - {% if step == Step.ANYTHING_ELSE %} -

    {{ application.anything_else|default:"No" }}

    - {% endif %} - {% if step == Step.REQUIREMENTS %} -

    {{ application.is_policy_acknowledged|yesno:"I agree.,I do not agree.,I do not agree." }}

    - {% endif %} -
-
- Edit {{ form_titles|get_item:step }} -
+ {% endif %} + + + {% if step == Step.ANYTHING_ELSE %} + {% namespaced_url 'application' step as application_url %} + {% with title=form_titles|get_item:step value=application.anything_else|default:"No" %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} + {% endif %} + + + {% if step == Step.REQUIREMENTS %} + {% namespaced_url 'application' step as application_url %} + {% with title=form_titles|get_item:step value=application.is_policy_acknowledged|yesno:"I agree.,I do not agree.,I do not agree." %} + {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %} + {% endwith %} + {% endif %} + + +
{% endfor %} {% endblock %} diff --git a/src/registrar/templates/includes/summary_item.html b/src/registrar/templates/includes/summary_item.html index 53364d1b2..657f3c29b 100644 --- a/src/registrar/templates/includes/summary_item.html +++ b/src/registrar/templates/includes/summary_item.html @@ -31,8 +31,10 @@
    {% for item in value %}
  • -

    - Contact {{forloop.counter}} +

    + + Contact {{forloop.counter}} +

    {% include "includes/contact.html" with contact=item %}
  • {% empty %} From 43f96f726f8f6389482e76d4b7f1af7689b2e1e7 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:28:39 -0700 Subject: [PATCH 06/12] Add www logic --- src/registrar/models/utility/domain_helper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/registrar/models/utility/domain_helper.py b/src/registrar/models/utility/domain_helper.py index a808ef803..3267f0c93 100644 --- a/src/registrar/models/utility/domain_helper.py +++ b/src/registrar/models/utility/domain_helper.py @@ -57,6 +57,9 @@ class DomainHelper: # If blank ok is true, just return the domain return domain + if domain.startswith("www."): + domain = domain[4:] + if domain.endswith(".gov"): domain = domain[:-4] From e1081d4cb63c64d24afb68251458413bba88e887 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:43:00 -0700 Subject: [PATCH 07/12] Unit test --- src/registrar/tests/test_forms.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/registrar/tests/test_forms.py b/src/registrar/tests/test_forms.py index a8d84ba7b..c9dd3c4f0 100644 --- a/src/registrar/tests/test_forms.py +++ b/src/registrar/tests/test_forms.py @@ -64,6 +64,12 @@ class TestFormValidation(MockEppLib): form = DotGovDomainForm(data={"requested_domain": "top-level-agency"}) self.assertEqual(len(form.errors), 0) + def test_requested_domain_starting_www(self): + """Test a valid domain name with .www at the beginning.""" + form = DotGovDomainForm(data={"requested_domain": "www.top-level-agency"}) + self.assertEqual(len(form.errors), 0) + self.assertEqual(form.cleaned_data["requested_domain"], "top-level-agency") + def test_requested_domain_ending_dotgov(self): """Just a valid domain name with .gov at the end.""" form = DotGovDomainForm(data={"requested_domain": "top-level-agency.gov"}) From 4fd674e0b47cd49b0fe764c1785822d1fb7b4d65 Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Tue, 23 Jan 2024 21:50:19 -0500 Subject: [PATCH 08/12] updated subheaders to h3 --- src/registrar/templates/includes/summary_item.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/registrar/templates/includes/summary_item.html b/src/registrar/templates/includes/summary_item.html index 657f3c29b..c7b606a8a 100644 --- a/src/registrar/templates/includes/summary_item.html +++ b/src/registrar/templates/includes/summary_item.html @@ -31,11 +31,9 @@
      {% for item in value %}
    • -

      - - Contact {{forloop.counter}} - -

      +

      + Contact {{forloop.counter}} +

      {% include "includes/contact.html" with contact=item %}
    • {% empty %}
    • None
    • From f8dbc03d919c79c65fa80650ac77015dcf4a5669 Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Thu, 25 Jan 2024 13:10:33 -0500 Subject: [PATCH 09/12] fixed display of current web sites --- src/registrar/templates/application_review.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html index 8efd9967d..451eb2339 100644 --- a/src/registrar/templates/application_review.html +++ b/src/registrar/templates/application_review.html @@ -94,7 +94,7 @@ {% if step == Step.CURRENT_SITES %} {% namespaced_url 'application' step as application_url %} - {% if application.alternative_domains.all %} + {% if application.current_websites.all %} {% with title=form_titles|get_item:step value=application.current_websites.all %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url list='true' %} {% endwith %} From 64e3d5a33acbfd34f50c3cca6b8fc6b99d6027aa Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Thu, 25 Jan 2024 13:29:57 -0500 Subject: [PATCH 10/12] updated markup on sumary_item and application_review --- src/registrar/templates/application_review.html | 4 ++-- src/registrar/templates/includes/summary_item.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html index 451eb2339..44bb43275 100644 --- a/src/registrar/templates/application_review.html +++ b/src/registrar/templates/application_review.html @@ -112,8 +112,8 @@ {% endwith %} {% if application.alternative_domains.all %} -

      Alternative domains

      -
        +

        Alternative domains

        +
          {% for site in application.alternative_domains.all %}
        • {{ site.website }}
        • {% endfor %} diff --git a/src/registrar/templates/includes/summary_item.html b/src/registrar/templates/includes/summary_item.html index c7b606a8a..a44989d74 100644 --- a/src/registrar/templates/includes/summary_item.html +++ b/src/registrar/templates/includes/summary_item.html @@ -31,7 +31,7 @@
            {% for item in value %}
          • -

            +

            Contact {{forloop.counter}}

            {% include "includes/contact.html" with contact=item %}
          • @@ -60,7 +60,7 @@

            {{ value | first }}

            {% endif %} {% else %} -
              +
                {% for item in value %} {% if users %}
              • {{ item.user.email }}
              • From dcbfcf7639dd310a690ca2199de5102e11254e56 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Thu, 25 Jan 2024 13:56:08 -0500 Subject: [PATCH 11/12] Stylistic changes, more semantic definition lists for contacts on review and summary pages --- .../assets/sass/_theme/_register-form.scss | 2 +- .../templates/application_review.html | 2 +- .../templates/includes/summary_item.html | 29 +++++++++++-------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/registrar/assets/sass/_theme/_register-form.scss b/src/registrar/assets/sass/_theme/_register-form.scss index 8332d17ae..d78bc512a 100644 --- a/src/registrar/assets/sass/_theme/_register-form.scss +++ b/src/registrar/assets/sass/_theme/_register-form.scss @@ -12,7 +12,7 @@ margin-top: units(1); } -.register-form-step h3:not(.text-base-darker) { +.register-form-step h3:not(.text-base-darkest) { color: color('primary-dark'); letter-spacing: $letter-space--xs; margin-top: units(3); diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html index 44bb43275..b6d37f6e3 100644 --- a/src/registrar/templates/application_review.html +++ b/src/registrar/templates/application_review.html @@ -112,7 +112,7 @@ {% endwith %} {% if application.alternative_domains.all %} -

                Alternative domains

                +

                Alternative domains

                  {% for site in application.alternative_domains.all %}
                • {{ site.website }}
                • diff --git a/src/registrar/templates/includes/summary_item.html b/src/registrar/templates/includes/summary_item.html index a44989d74..d2bdae709 100644 --- a/src/registrar/templates/includes/summary_item.html +++ b/src/registrar/templates/includes/summary_item.html @@ -28,17 +28,22 @@ {% if value|length == 1 %} {% include "includes/contact.html" with contact=value|first %} {% else %} -
                    - {% for item in value %} -
                  • -

                    - Contact {{forloop.counter}} -

                    - {% include "includes/contact.html" with contact=item %}
                  • - {% empty %} -
                  • None
                  • - {% endfor %} -
                  + {% if value %} +
                  + {% for item in value %} +
                  + Contact {{forloop.counter}} +
                  +
                  + {% include "includes/contact.html" with contact=item %} +
                  + {% endfor %} +
                  + {% else %} +

                  + None +

                  + {% endif %} {% endif %} {% else %} {% include "includes/contact.html" with contact=value %} @@ -57,7 +62,7 @@ {% endspaceless %}) {% endif %} {% else %} -

                  {{ value | first }}

                  +

                  {{ value | first }}

                  {% endif %} {% else %}
                    From 2d717b030742f291c8b3150c9bf559f802c861ec Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Fri, 26 Jan 2024 12:38:24 -0500 Subject: [PATCH 12/12] css refactor --- src/registrar/assets/sass/_theme/_lists.scss | 14 ++++++++++++++ .../assets/sass/_theme/_register-form.scss | 16 ++++++++++++++-- src/registrar/assets/sass/_theme/styles.scss | 1 + src/registrar/templates/application_review.html | 2 +- .../templates/includes/summary_item.html | 4 ++-- 5 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 src/registrar/assets/sass/_theme/_lists.scss diff --git a/src/registrar/assets/sass/_theme/_lists.scss b/src/registrar/assets/sass/_theme/_lists.scss new file mode 100644 index 000000000..b97abd569 --- /dev/null +++ b/src/registrar/assets/sass/_theme/_lists.scss @@ -0,0 +1,14 @@ +@use "uswds-core" as *; + +dt { + color: color('primary-dark'); + margin-top: units(2); + font-weight: font-weight('semibold'); + // The units mixin can only get us close, so it's between + // hardcoding the value and using in markup + font-size: 16.96px; +} +dd { + margin-left: 0; +} + diff --git a/src/registrar/assets/sass/_theme/_register-form.scss b/src/registrar/assets/sass/_theme/_register-form.scss index d78bc512a..7c93f0a10 100644 --- a/src/registrar/assets/sass/_theme/_register-form.scss +++ b/src/registrar/assets/sass/_theme/_register-form.scss @@ -6,13 +6,15 @@ margin-top: units(-1); } - //Tighter spacing when H2 is immediatly after H1 +// Tighter spacing when h2 is immediatly after h1 .register-form-step .usa-fieldset:first-of-type h2:first-of-type, .register-form-step h1 + h2 { margin-top: units(1); } -.register-form-step h3:not(.text-base-darkest) { +// register-form-review-header is used on the summary page and +// should not be styled like the register form headers +.register-form-step h3 { color: color('primary-dark'); letter-spacing: $letter-space--xs; margin-top: units(3); @@ -23,6 +25,16 @@ } } +h3.register-form-review-header { + color: color('primary-dark'); + margin-top: units(2); + margin-bottom: 0; + font-weight: font-weight('semibold'); + // The units mixin can only get us close, so it's between + // hardcoding the value and using in markup + font-size: 16.96px; +} + .register-form-step h4 { margin-bottom: 0; diff --git a/src/registrar/assets/sass/_theme/styles.scss b/src/registrar/assets/sass/_theme/styles.scss index 8a2e1d2d3..0239199e7 100644 --- a/src/registrar/assets/sass/_theme/styles.scss +++ b/src/registrar/assets/sass/_theme/styles.scss @@ -10,6 +10,7 @@ --- Custom Styles ---------------------------------*/ @forward "base"; @forward "typography"; +@forward "lists"; @forward "buttons"; @forward "forms"; @forward "fieldsets"; diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html index b6d37f6e3..7a4c1529b 100644 --- a/src/registrar/templates/application_review.html +++ b/src/registrar/templates/application_review.html @@ -112,7 +112,7 @@ {% endwith %} {% if application.alternative_domains.all %} -

                    Alternative domains

                    +

                    Alternative domains

                      {% for site in application.alternative_domains.all %}
                    • {{ site.website }}
                    • diff --git a/src/registrar/templates/includes/summary_item.html b/src/registrar/templates/includes/summary_item.html index d2bdae709..7c0d801ad 100644 --- a/src/registrar/templates/includes/summary_item.html +++ b/src/registrar/templates/includes/summary_item.html @@ -31,10 +31,10 @@ {% if value %}
                      {% for item in value %} -
                      +
                      Contact {{forloop.counter}}
                      -
                      +
                      {% include "includes/contact.html" with contact=item %}
                      {% endfor %}