From fb40943489a5f7a92d714fea19a6bb0c0cdd43d9 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:39:36 -0700 Subject: [PATCH 001/129] Update external link in domain_security_email.html to open in new tab --- src/registrar/templates/domain_security_email.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_security_email.html b/src/registrar/templates/domain_security_email.html index 8fb0ccfb0..7958d7ac1 100644 --- a/src/registrar/templates/domain_security_email.html +++ b/src/registrar/templates/domain_security_email.html @@ -7,7 +7,7 @@

Security email

-

We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

+

We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

A security contact should be capable of evaluating or triaging security reports for your entire domain. Use a team email address, not an individual’s email. We recommend using an alias, like security@domain.gov.

From 497c957863b159b8de17a83962d5a32f08a4513f Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:44:36 -0700 Subject: [PATCH 002/129] Update external link in domain_authorizing_official.html to open in new tab --- src/registrar/templates/domain_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_authorizing_official.html b/src/registrar/templates/domain_authorizing_official.html index c12f1f290..93b4b1b50 100644 --- a/src/registrar/templates/domain_authorizing_official.html +++ b/src/registrar/templates/domain_authorizing_official.html @@ -10,7 +10,7 @@

Authorizing official

Your authorizing official is the person within your organization who can - authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

+ authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

{% include "includes/required_fields.html" %} From 833b6f1b443c11c5f8277ed000c27924a2df9848 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 003/129] Update external link in application_tribal_government.html so that it has the external link icon --- src/registrar/templates/application_tribal_government.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 3c2a8999f..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,7 +7,7 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with target_blank="true" %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} From 030be7275aa66fd124cd4261ce76c2aef46c9b0e Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:16:14 -0700 Subject: [PATCH 004/129] Update external link in application_purpose.html to open in new tab --- src/registrar/templates/application_purpose.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index ca2ff7287..5135e6678 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -8,7 +8,7 @@ domain name or for mainly internal use.

Describe the reason for your domain request. Explain how you plan to use this domain. Who is your intended audience? Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)? -Read about activities that are prohibited on .gov domains.

+Read about activities that are prohibited on .gov domains.

{% endblock %} From 5abeef900b4f28f6be0aac30681f5e8598a42561 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:19:24 -0700 Subject: [PATCH 005/129] Update external link in application_dotgov_domain.html to open in new tab --- src/registrar/templates/application_dotgov_domain.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index fd6ce9604..0d11203ad 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -2,7 +2,7 @@ {% load static field_helpers url_helpers %} {% block form_instructions %} -

Before requesting a .gov domain, please make sure it +

Before requesting a .gov domain, please make sure it meets our naming requirements. Your domain name must:

  • Be available
  • From 32ea94e313a32ed3e44cb8e74529674ddd967384 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:22:00 -0700 Subject: [PATCH 006/129] Update external link in application_authorizing_official.html to open in new tab --- src/registrar/templates/application_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 2ac99be80..859a47520 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -12,7 +12,7 @@ {% include "includes/ao_example.html" %} -

    We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

    +

    We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

    {% endblock %} From 4d7c85978757221a6964c1b5f3df1c129d3230d7 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:34:50 -0700 Subject: [PATCH 007/129] Update external links in domain_example.html to open in new tabs --- src/registrar/templates/includes/domain_example.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/includes/domain_example.html b/src/registrar/templates/includes/domain_example.html index 8f803aa24..3b34b8e80 100644 --- a/src/registrar/templates/includes/domain_example.html +++ b/src/registrar/templates/includes/domain_example.html @@ -55,7 +55,7 @@
{% elif organization_type == 'county' %} -

Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

+

Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

Examples:

  • AdamsCountyMS.gov
  • @@ -68,7 +68,7 @@

    Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.

    Cities that meet one of the criteria below don’t have to refer to their state in the domain name.

      -
    • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
    • +
    • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
    • Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.
    • The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that don’t refer to their state.
    @@ -81,7 +81,7 @@

    {% elif organization_type == 'special_district' %} -

    Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

    +

    Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

    Examples:

    • ElectionsShelbyTN.gov
    • From 28fc18bd75a90691b7346f2aad85938d155e021f Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:54:08 -0700 Subject: [PATCH 008/129] Update external link in ao_example.html to open in new tab --- src/registrar/templates/includes/ao_example.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/includes/ao_example.html b/src/registrar/templates/includes/ao_example.html index 8a9d22915..13af78d3e 100644 --- a/src/registrar/templates/includes/ao_example.html +++ b/src/registrar/templates/includes/ao_example.html @@ -44,7 +44,7 @@

      Domain requests from state legislatures and courts must be authorized by an agency’s Chief Information Officer or highest-ranking executive.

      {% elif organization_type == 'tribal' %} -

      Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

      +

      Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

      Domain requests from state-recognized tribal governments must be authorized by the leader of the tribe, as determined by the state’s tribal recognition initiative.

      {% endif %} From 789813d4823162ae9fb94762ceed86334914a934 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:39:36 -0700 Subject: [PATCH 009/129] Update external link in domain_security_email.html to open in new tab --- src/registrar/templates/domain_security_email.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_security_email.html b/src/registrar/templates/domain_security_email.html index 8fb0ccfb0..7958d7ac1 100644 --- a/src/registrar/templates/domain_security_email.html +++ b/src/registrar/templates/domain_security_email.html @@ -7,7 +7,7 @@

      Security email

      -

      We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

      +

      We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

      A security contact should be capable of evaluating or triaging security reports for your entire domain. Use a team email address, not an individual’s email. We recommend using an alias, like security@domain.gov.

      From 1774b8d840fecc92dc4ab5936b03f55b28dbc271 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:44:36 -0700 Subject: [PATCH 010/129] Update external link in domain_authorizing_official.html to open in new tab --- src/registrar/templates/domain_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_authorizing_official.html b/src/registrar/templates/domain_authorizing_official.html index c12f1f290..93b4b1b50 100644 --- a/src/registrar/templates/domain_authorizing_official.html +++ b/src/registrar/templates/domain_authorizing_official.html @@ -10,7 +10,7 @@

      Authorizing official

      Your authorizing official is the person within your organization who can - authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

      + authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

      {% include "includes/required_fields.html" %} From b5bb9653d78d790eaa7a1cbbff9f0cb383faf701 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 011/129] Update external link in application_tribal_government.html so that it has the external link icon --- src/registrar/templates/application_tribal_government.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 3c2a8999f..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,7 +7,7 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with target_blank="true" %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} From 9b1e9c45989812043bc7ffe260743ecb9321edfa Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:16:14 -0700 Subject: [PATCH 012/129] Update external link in application_purpose.html to open in new tab --- src/registrar/templates/application_purpose.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index ca2ff7287..5135e6678 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -8,7 +8,7 @@ domain name or for mainly internal use.

      Describe the reason for your domain request. Explain how you plan to use this domain. Who is your intended audience? Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)? -Read about activities that are prohibited on .gov domains.

      +Read about activities that are prohibited on .gov domains.

      {% endblock %} From 1eb5ce5cfa90dcd6f6452262a5f68e1b1bf96a2e Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:19:24 -0700 Subject: [PATCH 013/129] Update external link in application_dotgov_domain.html to open in new tab --- src/registrar/templates/application_dotgov_domain.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index fd6ce9604..0d11203ad 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -2,7 +2,7 @@ {% load static field_helpers url_helpers %} {% block form_instructions %} -

      Before requesting a .gov domain, please make sure it +

      Before requesting a .gov domain, please make sure it meets our naming requirements. Your domain name must:

      • Be available
      • From cc8bcf69675153b857189ca3ee6328c230840387 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:22:00 -0700 Subject: [PATCH 014/129] Update external link in application_authorizing_official.html to open in new tab --- src/registrar/templates/application_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 2ac99be80..859a47520 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -12,7 +12,7 @@ {% include "includes/ao_example.html" %} -

        We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

        +

        We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

        {% endblock %} From a01b2040b8936c1bdb065f30ba12fbe81e5826b8 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:34:50 -0700 Subject: [PATCH 015/129] Update external links in domain_example.html to open in new tabs --- src/registrar/templates/includes/domain_example.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/includes/domain_example.html b/src/registrar/templates/includes/domain_example.html index 8f803aa24..3b34b8e80 100644 --- a/src/registrar/templates/includes/domain_example.html +++ b/src/registrar/templates/includes/domain_example.html @@ -55,7 +55,7 @@
      {% elif organization_type == 'county' %} -

      Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

      +

      Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

      Examples:

      • AdamsCountyMS.gov
      • @@ -68,7 +68,7 @@

        Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.

        Cities that meet one of the criteria below don’t have to refer to their state in the domain name.

          -
        • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
        • +
        • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
        • Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.
        • The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that don’t refer to their state.
        @@ -81,7 +81,7 @@

        {% elif organization_type == 'special_district' %} -

        Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

        +

        Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

        Examples:

        • ElectionsShelbyTN.gov
        • From 0bd12be2b69f5e7621dbf20ff2dbd909875d678f Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:54:08 -0700 Subject: [PATCH 016/129] Update external link in ao_example.html to open in new tab --- src/registrar/templates/includes/ao_example.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/includes/ao_example.html b/src/registrar/templates/includes/ao_example.html index 8a9d22915..13af78d3e 100644 --- a/src/registrar/templates/includes/ao_example.html +++ b/src/registrar/templates/includes/ao_example.html @@ -44,7 +44,7 @@

          Domain requests from state legislatures and courts must be authorized by an agency’s Chief Information Officer or highest-ranking executive.

          {% elif organization_type == 'tribal' %} -

          Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

          +

          Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

          Domain requests from state-recognized tribal governments must be authorized by the leader of the tribe, as determined by the state’s tribal recognition initiative.

          {% endif %} From 7a27083a8eaf39afa5ebdd8d3ee04e93845d345f Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:44:44 -0700 Subject: [PATCH 017/129] Updated Help and Contact us links in footer to open in new tab --- src/registrar/templates/includes/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/includes/footer.html b/src/registrar/templates/includes/footer.html index 869d6007b..29a14c37c 100644 --- a/src/registrar/templates/includes/footer.html +++ b/src/registrar/templates/includes/footer.html @@ -27,11 +27,11 @@ From 310d363d314b13abf3c538bd5aca854279b7781e Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:52:08 -0700 Subject: [PATCH 018/129] Updated error pages so that links to other sites open in new tab --- src/registrar/templates/401.html | 2 +- src/registrar/templates/403.html | 2 +- src/registrar/templates/404.html | 2 +- src/registrar/templates/500.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/templates/401.html b/src/registrar/templates/401.html index a419dab53..21ac9db35 100644 --- a/src/registrar/templates/401.html +++ b/src/registrar/templates/401.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

          - If you'd like help with this error contact us . + If you'd like help with this error contact us.

          {% if log_identifier %} diff --git a/src/registrar/templates/403.html b/src/registrar/templates/403.html index 93d32f65a..08057dfba 100644 --- a/src/registrar/templates/403.html +++ b/src/registrar/templates/403.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

          - If you'd like help with this error contact us . + If you'd like help with this error contact us.

          {% if log_identifier %} diff --git a/src/registrar/templates/404.html b/src/registrar/templates/404.html index deec71ce2..cf6983c60 100644 --- a/src/registrar/templates/404.html +++ b/src/registrar/templates/404.html @@ -15,7 +15,7 @@ {% translate "Status 404" %} -

          Try going to the homepage. If you can’t find what you’re looking for, contact us . +

          Try going to the homepage. If you can’t find what you’re looking for, contact us.

          diff --git a/src/registrar/templates/500.html b/src/registrar/templates/500.html index 5749c0ad3..3c95900b2 100644 --- a/src/registrar/templates/500.html +++ b/src/registrar/templates/500.html @@ -19,7 +19,7 @@ {% else %}

          Sorry! Try waiting a few minutes and then reloading the page. - contact us if you need help. + Contact us if you need help.

          {% endif %} From 4763d625dbebc4a030be112dbc1ccc4df7b92b70 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:44:44 -0700 Subject: [PATCH 019/129] Updated Help and Contact us links in footer to open in new tab --- src/registrar/templates/includes/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/includes/footer.html b/src/registrar/templates/includes/footer.html index 869d6007b..29a14c37c 100644 --- a/src/registrar/templates/includes/footer.html +++ b/src/registrar/templates/includes/footer.html @@ -27,11 +27,11 @@ From f27ded8e69734a94e9a2b218cac2560f6399ae4d Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:52:08 -0700 Subject: [PATCH 020/129] Updated error pages so that links to other sites open in new tab --- src/registrar/templates/401.html | 2 +- src/registrar/templates/403.html | 2 +- src/registrar/templates/404.html | 2 +- src/registrar/templates/500.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/templates/401.html b/src/registrar/templates/401.html index a419dab53..21ac9db35 100644 --- a/src/registrar/templates/401.html +++ b/src/registrar/templates/401.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

          - If you'd like help with this error contact us . + If you'd like help with this error contact us.

          {% if log_identifier %} diff --git a/src/registrar/templates/403.html b/src/registrar/templates/403.html index 93d32f65a..08057dfba 100644 --- a/src/registrar/templates/403.html +++ b/src/registrar/templates/403.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

          - If you'd like help with this error contact us . + If you'd like help with this error contact us.

          {% if log_identifier %} diff --git a/src/registrar/templates/404.html b/src/registrar/templates/404.html index deec71ce2..cf6983c60 100644 --- a/src/registrar/templates/404.html +++ b/src/registrar/templates/404.html @@ -15,7 +15,7 @@ {% translate "Status 404" %} -

          Try going to the homepage. If you can’t find what you’re looking for, contact us . +

          Try going to the homepage. If you can’t find what you’re looking for, contact us.

          diff --git a/src/registrar/templates/500.html b/src/registrar/templates/500.html index 5749c0ad3..3c95900b2 100644 --- a/src/registrar/templates/500.html +++ b/src/registrar/templates/500.html @@ -19,7 +19,7 @@ {% else %}

          Sorry! Try waiting a few minutes and then reloading the page. - contact us if you need help. + Contact us if you need help.

          {% endif %} From f9486a200257fe9d0c5d727ce687f363cab47d5e Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 021/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From 183163819c7d818c91c7cf814c5e522eaeefcb9a Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 022/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From b06bd0309c4981607be9e72d2cdd0884eed63d85 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:39:36 -0700 Subject: [PATCH 023/129] Update external link in domain_security_email.html to open in new tab --- src/registrar/templates/domain_security_email.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_security_email.html b/src/registrar/templates/domain_security_email.html index 8fb0ccfb0..7958d7ac1 100644 --- a/src/registrar/templates/domain_security_email.html +++ b/src/registrar/templates/domain_security_email.html @@ -7,7 +7,7 @@

          Security email

          -

          We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

          +

          We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

          A security contact should be capable of evaluating or triaging security reports for your entire domain. Use a team email address, not an individual’s email. We recommend using an alias, like security@domain.gov.

          From 479669fb7525b2fd3a17f70058d25efd619fcaea Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:44:36 -0700 Subject: [PATCH 024/129] Update external link in domain_authorizing_official.html to open in new tab --- src/registrar/templates/domain_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_authorizing_official.html b/src/registrar/templates/domain_authorizing_official.html index c12f1f290..93b4b1b50 100644 --- a/src/registrar/templates/domain_authorizing_official.html +++ b/src/registrar/templates/domain_authorizing_official.html @@ -10,7 +10,7 @@

          Authorizing official

          Your authorizing official is the person within your organization who can - authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

          + authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

          {% include "includes/required_fields.html" %} From dbc0eeddf3bcb9509ffeb5a11830f8b625eb7c37 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 025/129] Update external link in application_tribal_government.html so that it has the external link icon --- src/registrar/templates/application_tribal_government.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 3c2a8999f..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,7 +7,7 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with target_blank="true" %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} From b08d750a8e6efc3b09bbac7d4f9d686c0a321575 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:16:14 -0700 Subject: [PATCH 026/129] Update external link in application_purpose.html to open in new tab --- src/registrar/templates/application_purpose.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index ca2ff7287..5135e6678 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -8,7 +8,7 @@ domain name or for mainly internal use.

          Describe the reason for your domain request. Explain how you plan to use this domain. Who is your intended audience? Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)? -Read about activities that are prohibited on .gov domains.

          +Read about activities that are prohibited on .gov domains.

          {% endblock %} From 659dae4817e49fec353549a512311cfea6a6ef38 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:19:24 -0700 Subject: [PATCH 027/129] Update external link in application_dotgov_domain.html to open in new tab --- src/registrar/templates/application_dotgov_domain.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index fd6ce9604..0d11203ad 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -2,7 +2,7 @@ {% load static field_helpers url_helpers %} {% block form_instructions %} -

          Before requesting a .gov domain, please make sure it +

          Before requesting a .gov domain, please make sure it meets our naming requirements. Your domain name must:

          • Be available
          • From 21aa75f5919ae7b3cb0b837ca803c5435113d7c3 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:22:00 -0700 Subject: [PATCH 028/129] Update external link in application_authorizing_official.html to open in new tab --- src/registrar/templates/application_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 2ac99be80..859a47520 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -12,7 +12,7 @@ {% include "includes/ao_example.html" %} -

            We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

            +

            We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

            {% endblock %} From fb5aa950a91de4f1e6c72b16e520a6f46229ec31 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:34:50 -0700 Subject: [PATCH 029/129] Update external links in domain_example.html to open in new tabs --- src/registrar/templates/includes/domain_example.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/includes/domain_example.html b/src/registrar/templates/includes/domain_example.html index 8f803aa24..3b34b8e80 100644 --- a/src/registrar/templates/includes/domain_example.html +++ b/src/registrar/templates/includes/domain_example.html @@ -55,7 +55,7 @@
          {% elif organization_type == 'county' %} -

          Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

          +

          Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

          Examples:

          • AdamsCountyMS.gov
          • @@ -68,7 +68,7 @@

            Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.

            Cities that meet one of the criteria below don’t have to refer to their state in the domain name.

              -
            • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
            • +
            • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
            • Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.
            • The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that don’t refer to their state.
            @@ -81,7 +81,7 @@

            {% elif organization_type == 'special_district' %} -

            Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

            +

            Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

            Examples:

            • ElectionsShelbyTN.gov
            • From d0f6e25c9db8c28f0d0abf8519ac567693e9fee4 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:54:08 -0700 Subject: [PATCH 030/129] Update external link in ao_example.html to open in new tab --- src/registrar/templates/includes/ao_example.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/includes/ao_example.html b/src/registrar/templates/includes/ao_example.html index 8a9d22915..13af78d3e 100644 --- a/src/registrar/templates/includes/ao_example.html +++ b/src/registrar/templates/includes/ao_example.html @@ -44,7 +44,7 @@

              Domain requests from state legislatures and courts must be authorized by an agency’s Chief Information Officer or highest-ranking executive.

              {% elif organization_type == 'tribal' %} -

              Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

              +

              Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

              Domain requests from state-recognized tribal governments must be authorized by the leader of the tribe, as determined by the state’s tribal recognition initiative.

              {% endif %} From e8a31f5ec9388f41a413e81983c8a083aa86ab69 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:44:44 -0700 Subject: [PATCH 031/129] Updated Help and Contact us links in footer to open in new tab --- src/registrar/templates/includes/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/includes/footer.html b/src/registrar/templates/includes/footer.html index 869d6007b..29a14c37c 100644 --- a/src/registrar/templates/includes/footer.html +++ b/src/registrar/templates/includes/footer.html @@ -27,11 +27,11 @@ From 07fe08cbf36fab2f85e4cd47d2abae2bdae3db1c Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:52:08 -0700 Subject: [PATCH 032/129] Updated error pages so that links to other sites open in new tab --- src/registrar/templates/401.html | 2 +- src/registrar/templates/403.html | 2 +- src/registrar/templates/404.html | 2 +- src/registrar/templates/500.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/templates/401.html b/src/registrar/templates/401.html index a419dab53..21ac9db35 100644 --- a/src/registrar/templates/401.html +++ b/src/registrar/templates/401.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

              - If you'd like help with this error contact us . + If you'd like help with this error contact us.

              {% if log_identifier %} diff --git a/src/registrar/templates/403.html b/src/registrar/templates/403.html index 93d32f65a..08057dfba 100644 --- a/src/registrar/templates/403.html +++ b/src/registrar/templates/403.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

              - If you'd like help with this error contact us . + If you'd like help with this error contact us.

              {% if log_identifier %} diff --git a/src/registrar/templates/404.html b/src/registrar/templates/404.html index deec71ce2..cf6983c60 100644 --- a/src/registrar/templates/404.html +++ b/src/registrar/templates/404.html @@ -15,7 +15,7 @@ {% translate "Status 404" %} -

              Try going to the homepage. If you can’t find what you’re looking for, contact us . +

              Try going to the homepage. If you can’t find what you’re looking for, contact us.

              diff --git a/src/registrar/templates/500.html b/src/registrar/templates/500.html index 5749c0ad3..3c95900b2 100644 --- a/src/registrar/templates/500.html +++ b/src/registrar/templates/500.html @@ -19,7 +19,7 @@ {% else %}

              Sorry! Try waiting a few minutes and then reloading the page. - contact us if you need help. + Contact us if you need help.

              {% endif %} From 34d28267d4cbaf01f928b8d520f947246c7636d1 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 033/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From 8701f5f26705eaa78ef36ea615fa3e3bc7b3b9c2 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:39:36 -0700 Subject: [PATCH 034/129] Update external link in domain_security_email.html to open in new tab --- src/registrar/templates/domain_security_email.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_security_email.html b/src/registrar/templates/domain_security_email.html index 8fb0ccfb0..7958d7ac1 100644 --- a/src/registrar/templates/domain_security_email.html +++ b/src/registrar/templates/domain_security_email.html @@ -7,7 +7,7 @@

              Security email

              -

              We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

              +

              We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

              A security contact should be capable of evaluating or triaging security reports for your entire domain. Use a team email address, not an individual’s email. We recommend using an alias, like security@domain.gov.

              From 99b26c5e6f07aaeca5e45b161581f9a125303a57 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:44:36 -0700 Subject: [PATCH 035/129] Update external link in domain_authorizing_official.html to open in new tab --- src/registrar/templates/domain_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_authorizing_official.html b/src/registrar/templates/domain_authorizing_official.html index c12f1f290..93b4b1b50 100644 --- a/src/registrar/templates/domain_authorizing_official.html +++ b/src/registrar/templates/domain_authorizing_official.html @@ -10,7 +10,7 @@

              Authorizing official

              Your authorizing official is the person within your organization who can - authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

              + authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

              {% include "includes/required_fields.html" %} From 9e4d873c20ec0530da8fc2fc498b57e312880b8f Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 036/129] Update external link in application_tribal_government.html so that it has the external link icon --- src/registrar/templates/application_tribal_government.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 3c2a8999f..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,7 +7,7 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with target_blank="true" %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} From 67198218291ab25758b6544f0eb39da5922bc4bf Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:16:14 -0700 Subject: [PATCH 037/129] Update external link in application_purpose.html to open in new tab --- src/registrar/templates/application_purpose.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index ca2ff7287..5135e6678 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -8,7 +8,7 @@ domain name or for mainly internal use.

              Describe the reason for your domain request. Explain how you plan to use this domain. Who is your intended audience? Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)? -Read about activities that are prohibited on .gov domains.

              +Read about activities that are prohibited on .gov domains.

              {% endblock %} From aa6797ae3cc126d5e1fc0e6e269639a4584733c8 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:19:24 -0700 Subject: [PATCH 038/129] Update external link in application_dotgov_domain.html to open in new tab --- src/registrar/templates/application_dotgov_domain.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index fd6ce9604..0d11203ad 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -2,7 +2,7 @@ {% load static field_helpers url_helpers %} {% block form_instructions %} -

              Before requesting a .gov domain, please make sure it +

              Before requesting a .gov domain, please make sure it meets our naming requirements. Your domain name must:

              • Be available
              • From f9c3bfb64208b97d4744effea4e68cb3aad533b2 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:22:00 -0700 Subject: [PATCH 039/129] Update external link in application_authorizing_official.html to open in new tab --- src/registrar/templates/application_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 2ac99be80..859a47520 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -12,7 +12,7 @@ {% include "includes/ao_example.html" %} -

                We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

                +

                We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

                {% endblock %} From c3e4ee26be8bae5e159c5a01ee4a28043c7cd0c4 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:34:50 -0700 Subject: [PATCH 040/129] Update external links in domain_example.html to open in new tabs --- src/registrar/templates/includes/domain_example.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/includes/domain_example.html b/src/registrar/templates/includes/domain_example.html index 8f803aa24..3b34b8e80 100644 --- a/src/registrar/templates/includes/domain_example.html +++ b/src/registrar/templates/includes/domain_example.html @@ -55,7 +55,7 @@
              {% elif organization_type == 'county' %} -

              Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

              +

              Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

              Examples:

              • AdamsCountyMS.gov
              • @@ -68,7 +68,7 @@

                Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.

                Cities that meet one of the criteria below don’t have to refer to their state in the domain name.

                  -
                • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
                • +
                • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
                • Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.
                • The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that don’t refer to their state.
                @@ -81,7 +81,7 @@

                {% elif organization_type == 'special_district' %} -

                Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

                +

                Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

                Examples:

                • ElectionsShelbyTN.gov
                • From 7672f97a29e3d7da1b5ba15626ac27409b8859d8 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:54:08 -0700 Subject: [PATCH 041/129] Update external link in ao_example.html to open in new tab --- src/registrar/templates/includes/ao_example.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/includes/ao_example.html b/src/registrar/templates/includes/ao_example.html index 8a9d22915..13af78d3e 100644 --- a/src/registrar/templates/includes/ao_example.html +++ b/src/registrar/templates/includes/ao_example.html @@ -44,7 +44,7 @@

                  Domain requests from state legislatures and courts must be authorized by an agency’s Chief Information Officer or highest-ranking executive.

                  {% elif organization_type == 'tribal' %} -

                  Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

                  +

                  Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

                  Domain requests from state-recognized tribal governments must be authorized by the leader of the tribe, as determined by the state’s tribal recognition initiative.

                  {% endif %} From c89f7cdc43b4422da2f2ede90c54bc2e6dfce2f0 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:44:44 -0700 Subject: [PATCH 042/129] Updated Help and Contact us links in footer to open in new tab --- src/registrar/templates/includes/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/includes/footer.html b/src/registrar/templates/includes/footer.html index 869d6007b..29a14c37c 100644 --- a/src/registrar/templates/includes/footer.html +++ b/src/registrar/templates/includes/footer.html @@ -27,11 +27,11 @@ From 4885d74103ef9dbcfacbaaba256a9532aa966173 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:52:08 -0700 Subject: [PATCH 043/129] Updated error pages so that links to other sites open in new tab --- src/registrar/templates/401.html | 2 +- src/registrar/templates/403.html | 2 +- src/registrar/templates/404.html | 2 +- src/registrar/templates/500.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/templates/401.html b/src/registrar/templates/401.html index a419dab53..21ac9db35 100644 --- a/src/registrar/templates/401.html +++ b/src/registrar/templates/401.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

                  - If you'd like help with this error contact us . + If you'd like help with this error contact us.

                  {% if log_identifier %} diff --git a/src/registrar/templates/403.html b/src/registrar/templates/403.html index 93d32f65a..08057dfba 100644 --- a/src/registrar/templates/403.html +++ b/src/registrar/templates/403.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

                  - If you'd like help with this error contact us . + If you'd like help with this error contact us.

                  {% if log_identifier %} diff --git a/src/registrar/templates/404.html b/src/registrar/templates/404.html index deec71ce2..cf6983c60 100644 --- a/src/registrar/templates/404.html +++ b/src/registrar/templates/404.html @@ -15,7 +15,7 @@ {% translate "Status 404" %} -

                  Try going to the homepage. If you can’t find what you’re looking for, contact us . +

                  Try going to the homepage. If you can’t find what you’re looking for, contact us.

                  diff --git a/src/registrar/templates/500.html b/src/registrar/templates/500.html index 5749c0ad3..3c95900b2 100644 --- a/src/registrar/templates/500.html +++ b/src/registrar/templates/500.html @@ -19,7 +19,7 @@ {% else %}

                  Sorry! Try waiting a few minutes and then reloading the page. - contact us if you need help. + Contact us if you need help.

                  {% endif %} From 39719b285f176e7d7dd854752e37873d8cb277d2 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 044/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From 17f938db2a16bcd4c8a695510a489312a9be4abc Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:39:36 -0700 Subject: [PATCH 045/129] Update external link in domain_security_email.html to open in new tab --- src/registrar/templates/domain_security_email.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_security_email.html b/src/registrar/templates/domain_security_email.html index 8fb0ccfb0..7958d7ac1 100644 --- a/src/registrar/templates/domain_security_email.html +++ b/src/registrar/templates/domain_security_email.html @@ -7,7 +7,7 @@

                  Security email

                  -

                  We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

                  +

                  We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

                  A security contact should be capable of evaluating or triaging security reports for your entire domain. Use a team email address, not an individual’s email. We recommend using an alias, like security@domain.gov.

                  From efe15b54ae6920e1cb9ce0b242a158a7b1933904 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:44:36 -0700 Subject: [PATCH 046/129] Update external link in domain_authorizing_official.html to open in new tab --- src/registrar/templates/domain_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_authorizing_official.html b/src/registrar/templates/domain_authorizing_official.html index c12f1f290..93b4b1b50 100644 --- a/src/registrar/templates/domain_authorizing_official.html +++ b/src/registrar/templates/domain_authorizing_official.html @@ -10,7 +10,7 @@

                  Authorizing official

                  Your authorizing official is the person within your organization who can - authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

                  + authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

                  {% include "includes/required_fields.html" %} From bb5f32a1ffe02fa93cacc3e16e2f572b9f44b813 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 047/129] Update external link in application_tribal_government.html so that it has the external link icon --- src/registrar/templates/application_tribal_government.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 3c2a8999f..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,7 +7,7 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with target_blank="true" %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} From 8be2c73b1149f5e192e50ac11200ce05de90e818 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:16:14 -0700 Subject: [PATCH 048/129] Update external link in application_purpose.html to open in new tab --- src/registrar/templates/application_purpose.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index ca2ff7287..5135e6678 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -8,7 +8,7 @@ domain name or for mainly internal use.

                  Describe the reason for your domain request. Explain how you plan to use this domain. Who is your intended audience? Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)? -Read about activities that are prohibited on .gov domains.

                  +Read about activities that are prohibited on .gov domains.

                  {% endblock %} From bb61d16ba261c9b2b09e3b104f9e2cb91e7c6c6a Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:19:24 -0700 Subject: [PATCH 049/129] Update external link in application_dotgov_domain.html to open in new tab --- src/registrar/templates/application_dotgov_domain.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index fd6ce9604..0d11203ad 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -2,7 +2,7 @@ {% load static field_helpers url_helpers %} {% block form_instructions %} -

                  Before requesting a .gov domain, please make sure it +

                  Before requesting a .gov domain, please make sure it meets our naming requirements. Your domain name must:

                  • Be available
                  • From e2dc6df6afef54bf156846d0c594a51e5806547c Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:22:00 -0700 Subject: [PATCH 050/129] Update external link in application_authorizing_official.html to open in new tab --- src/registrar/templates/application_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 2ac99be80..859a47520 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -12,7 +12,7 @@ {% include "includes/ao_example.html" %} -

                    We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

                    +

                    We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

                    {% endblock %} From 9c1ae18c275713d121eb89a93c1355c75f0dcee3 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:34:50 -0700 Subject: [PATCH 051/129] Update external links in domain_example.html to open in new tabs --- src/registrar/templates/includes/domain_example.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/includes/domain_example.html b/src/registrar/templates/includes/domain_example.html index 8f803aa24..3b34b8e80 100644 --- a/src/registrar/templates/includes/domain_example.html +++ b/src/registrar/templates/includes/domain_example.html @@ -55,7 +55,7 @@
                  {% elif organization_type == 'county' %} -

                  Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

                  +

                  Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

                  Examples:

                  • AdamsCountyMS.gov
                  • @@ -68,7 +68,7 @@

                    Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.

                    Cities that meet one of the criteria below don’t have to refer to their state in the domain name.

                      -
                    • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
                    • +
                    • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
                    • Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.
                    • The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that don’t refer to their state.
                    @@ -81,7 +81,7 @@

                    {% elif organization_type == 'special_district' %} -

                    Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

                    +

                    Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

                    Examples:

                    • ElectionsShelbyTN.gov
                    • From c601cd29cde802ce2da7bdf5b12696e151adf2c9 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:54:08 -0700 Subject: [PATCH 052/129] Update external link in ao_example.html to open in new tab --- src/registrar/templates/includes/ao_example.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/includes/ao_example.html b/src/registrar/templates/includes/ao_example.html index 8a9d22915..13af78d3e 100644 --- a/src/registrar/templates/includes/ao_example.html +++ b/src/registrar/templates/includes/ao_example.html @@ -44,7 +44,7 @@

                      Domain requests from state legislatures and courts must be authorized by an agency’s Chief Information Officer or highest-ranking executive.

                      {% elif organization_type == 'tribal' %} -

                      Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

                      +

                      Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

                      Domain requests from state-recognized tribal governments must be authorized by the leader of the tribe, as determined by the state’s tribal recognition initiative.

                      {% endif %} From 8265dda1c636a6356361a2c5b8456b8defa23bc6 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:44:44 -0700 Subject: [PATCH 053/129] Updated Help and Contact us links in footer to open in new tab --- src/registrar/templates/includes/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/includes/footer.html b/src/registrar/templates/includes/footer.html index 869d6007b..29a14c37c 100644 --- a/src/registrar/templates/includes/footer.html +++ b/src/registrar/templates/includes/footer.html @@ -27,11 +27,11 @@ From f333fd3e304cd17947d77a9e4395cf512cfe9fe2 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:52:08 -0700 Subject: [PATCH 054/129] Updated error pages so that links to other sites open in new tab --- src/registrar/templates/401.html | 2 +- src/registrar/templates/403.html | 2 +- src/registrar/templates/404.html | 2 +- src/registrar/templates/500.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/templates/401.html b/src/registrar/templates/401.html index a419dab53..21ac9db35 100644 --- a/src/registrar/templates/401.html +++ b/src/registrar/templates/401.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

                      - If you'd like help with this error contact us . + If you'd like help with this error contact us.

                      {% if log_identifier %} diff --git a/src/registrar/templates/403.html b/src/registrar/templates/403.html index 93d32f65a..08057dfba 100644 --- a/src/registrar/templates/403.html +++ b/src/registrar/templates/403.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

                      - If you'd like help with this error contact us . + If you'd like help with this error contact us.

                      {% if log_identifier %} diff --git a/src/registrar/templates/404.html b/src/registrar/templates/404.html index deec71ce2..cf6983c60 100644 --- a/src/registrar/templates/404.html +++ b/src/registrar/templates/404.html @@ -15,7 +15,7 @@ {% translate "Status 404" %} -

                      Try going to the homepage. If you can’t find what you’re looking for, contact us . +

                      Try going to the homepage. If you can’t find what you’re looking for, contact us.

                      diff --git a/src/registrar/templates/500.html b/src/registrar/templates/500.html index 5749c0ad3..3c95900b2 100644 --- a/src/registrar/templates/500.html +++ b/src/registrar/templates/500.html @@ -19,7 +19,7 @@ {% else %}

                      Sorry! Try waiting a few minutes and then reloading the page. - contact us if you need help. + Contact us if you need help.

                      {% endif %} From d48fa2623edfd7597ac7340e593cdfcc0b462c51 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 055/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From 24556ebd834bbbac87d2744a84e44b022aeb6cdd Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:39:36 -0700 Subject: [PATCH 056/129] Update external link in domain_security_email.html to open in new tab --- src/registrar/templates/domain_security_email.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_security_email.html b/src/registrar/templates/domain_security_email.html index 8fb0ccfb0..7958d7ac1 100644 --- a/src/registrar/templates/domain_security_email.html +++ b/src/registrar/templates/domain_security_email.html @@ -7,7 +7,7 @@

                      Security email

                      -

                      We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

                      +

                      We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public and included in the .gov domain data we provide.

                      A security contact should be capable of evaluating or triaging security reports for your entire domain. Use a team email address, not an individual’s email. We recommend using an alias, like security@domain.gov.

                      From aaf8d8caf9301df3a0b39eb180978f30d89ca6c7 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 16:44:36 -0700 Subject: [PATCH 057/129] Update external link in domain_authorizing_official.html to open in new tab --- src/registrar/templates/domain_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_authorizing_official.html b/src/registrar/templates/domain_authorizing_official.html index c12f1f290..93b4b1b50 100644 --- a/src/registrar/templates/domain_authorizing_official.html +++ b/src/registrar/templates/domain_authorizing_official.html @@ -10,7 +10,7 @@

                      Authorizing official

                      Your authorizing official is the person within your organization who can - authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

                      + authorize domain requests. This person must be in a role of significant, executive responsibility within the organization. Read more about who can serve as an authorizing official.

                      {% include "includes/required_fields.html" %} From 89177cc685c3e09bb86b25d20a6b722d73fa3a7e Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 058/129] Update external link in application_tribal_government.html so that it has the external link icon --- src/registrar/templates/application_tribal_government.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 3c2a8999f..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,7 +7,7 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with target_blank="true" %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} From d3288ef456b442da61dba8cf269ee91ff641aacb Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:16:14 -0700 Subject: [PATCH 059/129] Update external link in application_purpose.html to open in new tab --- src/registrar/templates/application_purpose.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index ca2ff7287..5135e6678 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -8,7 +8,7 @@ domain name or for mainly internal use.

                      Describe the reason for your domain request. Explain how you plan to use this domain. Who is your intended audience? Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)? -Read about activities that are prohibited on .gov domains.

                      +Read about activities that are prohibited on .gov domains.

                      {% endblock %} From 9cae54956c82dd0caaf2b0bdd4f6ec7f06e02f10 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:19:24 -0700 Subject: [PATCH 060/129] Update external link in application_dotgov_domain.html to open in new tab --- src/registrar/templates/application_dotgov_domain.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index fd6ce9604..0d11203ad 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -2,7 +2,7 @@ {% load static field_helpers url_helpers %} {% block form_instructions %} -

                      Before requesting a .gov domain, please make sure it +

                      Before requesting a .gov domain, please make sure it meets our naming requirements. Your domain name must:

                      • Be available
                      • From 36452e736271706bb5241d81e92ccf251a1c140d Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:22:00 -0700 Subject: [PATCH 061/129] Update external link in application_authorizing_official.html to open in new tab --- src/registrar/templates/application_authorizing_official.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 2ac99be80..859a47520 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -12,7 +12,7 @@ {% include "includes/ao_example.html" %} -

                        We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

                        +

                        We typically don’t reach out to the authorizing official, but if contact is necessary, our practice is to coordinate first with you, the requestor. Read more about who can serve as an authorizing official.

                        {% endblock %} From 35cdab10061cc1b5143bd6500a3c534648c922e3 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:34:50 -0700 Subject: [PATCH 062/129] Update external links in domain_example.html to open in new tabs --- src/registrar/templates/includes/domain_example.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/includes/domain_example.html b/src/registrar/templates/includes/domain_example.html index 8f803aa24..3b34b8e80 100644 --- a/src/registrar/templates/includes/domain_example.html +++ b/src/registrar/templates/includes/domain_example.html @@ -55,7 +55,7 @@
                      {% elif organization_type == 'county' %} -

                      Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

                      +

                      Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that aren’t shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureau’s National Places Gazetteer Files to determine if county names are unique.

                      Examples:

                      • AdamsCountyMS.gov
                      • @@ -68,7 +68,7 @@

                        Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.

                        Cities that meet one of the criteria below don’t have to refer to their state in the domain name.

                          -
                        • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
                        • +
                        • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
                        • Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.
                        • The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that don’t refer to their state.
                        @@ -81,7 +81,7 @@

                        {% elif organization_type == 'special_district' %} -

                        Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

                        +

                        Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless county or city exceptions apply.

                        Examples:

                        • ElectionsShelbyTN.gov
                        • From 8a3e03919cc892946fc5fee5c1c755d7e37e11a7 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:54:08 -0700 Subject: [PATCH 063/129] Update external link in ao_example.html to open in new tab --- src/registrar/templates/includes/ao_example.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/includes/ao_example.html b/src/registrar/templates/includes/ao_example.html index 8a9d22915..13af78d3e 100644 --- a/src/registrar/templates/includes/ao_example.html +++ b/src/registrar/templates/includes/ao_example.html @@ -44,7 +44,7 @@

                          Domain requests from state legislatures and courts must be authorized by an agency’s Chief Information Officer or highest-ranking executive.

                          {% elif organization_type == 'tribal' %} -

                          Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

                          +

                          Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

                          Domain requests from state-recognized tribal governments must be authorized by the leader of the tribe, as determined by the state’s tribal recognition initiative.

                          {% endif %} From 0c92d8e6a6bb20de06fcc24955e450c5115cd86b Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:44:44 -0700 Subject: [PATCH 064/129] Updated Help and Contact us links in footer to open in new tab --- src/registrar/templates/includes/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/includes/footer.html b/src/registrar/templates/includes/footer.html index 869d6007b..29a14c37c 100644 --- a/src/registrar/templates/includes/footer.html +++ b/src/registrar/templates/includes/footer.html @@ -27,11 +27,11 @@ From 557508929cc7b03bf23ff3496e4635ec35a9a1ba Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 10:52:08 -0700 Subject: [PATCH 065/129] Updated error pages so that links to other sites open in new tab --- src/registrar/templates/401.html | 2 +- src/registrar/templates/403.html | 2 +- src/registrar/templates/404.html | 2 +- src/registrar/templates/500.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/templates/401.html b/src/registrar/templates/401.html index a419dab53..21ac9db35 100644 --- a/src/registrar/templates/401.html +++ b/src/registrar/templates/401.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

                          - If you'd like help with this error contact us . + If you'd like help with this error contact us.

                          {% if log_identifier %} diff --git a/src/registrar/templates/403.html b/src/registrar/templates/403.html index 93d32f65a..08057dfba 100644 --- a/src/registrar/templates/403.html +++ b/src/registrar/templates/403.html @@ -26,7 +26,7 @@ Would you like to try logging in again?

                          - If you'd like help with this error contact us . + If you'd like help with this error contact us.

                          {% if log_identifier %} diff --git a/src/registrar/templates/404.html b/src/registrar/templates/404.html index deec71ce2..cf6983c60 100644 --- a/src/registrar/templates/404.html +++ b/src/registrar/templates/404.html @@ -15,7 +15,7 @@ {% translate "Status 404" %} -

                          Try going to the homepage. If you can’t find what you’re looking for, contact us . +

                          Try going to the homepage. If you can’t find what you’re looking for, contact us.

                          diff --git a/src/registrar/templates/500.html b/src/registrar/templates/500.html index 5749c0ad3..3c95900b2 100644 --- a/src/registrar/templates/500.html +++ b/src/registrar/templates/500.html @@ -19,7 +19,7 @@ {% else %}

                          Sorry! Try waiting a few minutes and then reloading the page. - contact us if you need help. + Contact us if you need help.

                          {% endif %} From 493788320932b91fabafa488dde22c7a66dc6c1c Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 066/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From 470bc189e40e42901eb4bb77ce1d25139194ac8e Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 067/129] Update external link in application_tribal_government.html so that it has the external link icon --- .../templates/application_tribal_government.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 48eb79f18..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,12 +7,8 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external" %} - {% with rel="noopener noreferrer" %} - {% with target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} - {% endwith %} - {% endwith %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} {% endwith %} From 522fb0392b11bc9b5e0c20a86f70ed3ca372997f Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 068/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From 6a84d0fb49f8bbe175cab0179d9de7beb9c32993 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 069/129] Update external link in application_tribal_government.html so that it has the external link icon --- .../templates/application_tribal_government.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 48eb79f18..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,12 +7,8 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external" %} - {% with rel="noopener noreferrer" %} - {% with target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} - {% endwith %} - {% endwith %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} {% endwith %} From 2c386b5c12899c499050c3548b62c4c187dae203 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 070/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From a6ed1df4b02053087f2f359ecdee7b6a8f6d2f8b Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 071/129] Update external link in application_tribal_government.html so that it has the external link icon --- .../templates/application_tribal_government.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 48eb79f18..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,12 +7,8 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external" %} - {% with rel="noopener noreferrer" %} - {% with target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} - {% endwith %} - {% endwith %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} {% endwith %} From 094271ffae6e3c6a8a0b1d8fc3ae20a9aad682f8 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 072/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From 1f129776099be746449de20e70951b677393e033 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 073/129] Update external link in application_tribal_government.html so that it has the external link icon --- .../templates/application_tribal_government.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 48eb79f18..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,12 +7,8 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external" %} - {% with rel="noopener noreferrer" %} - {% with target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} - {% endwith %} - {% endwith %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} {% endwith %} From eedfd47c8293f9ec469e34af422a6d7e79945053 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 074/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From cc56386b2c84a760b2178d6cd2659b904ba77ed5 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 075/129] Update external link in application_tribal_government.html so that it has the external link icon --- .../application_tribal_government.html | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/registrar/templates/application_tribal_government.html diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html deleted file mode 100644 index 48eb79f18..000000000 --- a/src/registrar/templates/application_tribal_government.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends 'application_form.html' %} -{% load field_helpers %} - - -{% block form_fields %} - - {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} - {% with link_text="Bureau of Indian Affairs" %} - {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external" %} - {% with rel="noopener noreferrer" %} - {% with target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} - {% endwith %} - {% endwith %} - {% endwith %} - {% endwith %} - {% endwith %} - {% endwith %} - -
                          - -

                          Is your organization a federally-recognized tribe or a state-recognized tribe? Check all that apply. - *

                          -
                          - {% input_with_errors forms.0.federally_recognized_tribe %} - {% input_with_errors forms.0.state_recognized_tribe %} -
                          -{% endblock %} From 8e260c05b467041f0a1597ba56d96051aaf0ac5d Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 076/129] Following Django template formatting --- .../application_tribal_government.html | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/registrar/templates/application_tribal_government.html diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html new file mode 100644 index 000000000..48eb79f18 --- /dev/null +++ b/src/registrar/templates/application_tribal_government.html @@ -0,0 +1,29 @@ +{% extends 'application_form.html' %} +{% load field_helpers %} + + +{% block form_fields %} + + {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} + {% with link_text="Bureau of Indian Affairs" %} + {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endwith %} + +
                          + +

                          Is your organization a federally-recognized tribe or a state-recognized tribe? Check all that apply. + *

                          +
                          + {% input_with_errors forms.0.federally_recognized_tribe %} + {% input_with_errors forms.0.state_recognized_tribe %} +
                          +{% endblock %} From 03aa9f48def9c012c7d6a5bfef1fff419cd4e10c Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Thu, 26 Oct 2023 17:12:22 -0700 Subject: [PATCH 077/129] Update external link in application_tribal_government.html so that it has the external link icon --- .../templates/application_tribal_government.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 48eb79f18..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,12 +7,8 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external" %} - {% with rel="noopener noreferrer" %} - {% with target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} - {% endwith %} - {% endwith %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} {% endwith %} From 913cee212f2a1c5a7f5896193d9482e34c26f52e Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Fri, 27 Oct 2023 11:15:49 -0700 Subject: [PATCH 078/129] Following Django template formatting --- .../templates/application_tribal_government.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..48eb79f18 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,8 +7,12 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} + {% with class="usa-link usa-link--external" %} + {% with rel="noopener noreferrer" %} + {% with target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} {% endwith %} From d30258207511a064add39c8bc7b8a6c00f2dfec4 Mon Sep 17 00:00:00 2001 From: Kristina Yin <140533113+kristinacyin@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:08:26 -0700 Subject: [PATCH 079/129] Making sure Bureau of Indian Affairs link actually shows external link icon --- .../templates/application_tribal_government.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 48eb79f18..f69002344 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,12 +7,8 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external" %} - {% with rel="noopener noreferrer" %} - {% with target_blank="true" %} - {% input_with_errors forms.0.tribe_name %} - {% endwith %} - {% endwith %} + {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} + {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} {% endwith %} From 1ce3095fde91e3b7a26e2763870e8eccc6b5e0ed Mon Sep 17 00:00:00 2001 From: Kristina Yin <140533113+kristinacyin@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:56:03 -0700 Subject: [PATCH 080/129] Removing commas - following Django template for multiple tags I'm trying to get the Bureau of Indian Affairs link to have an external link icon --- src/registrar/templates/application_tribal_government.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index f69002344..84a7d83b3 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,7 +7,7 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external", rel="noopener noreferrer", target_blank="true" %} + {% with class="usa-link usa-link--external" rel="noopener noreferrer" target_blank="true" %} {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} From ae788a67d1a65aa416830e98473c9036d4846e6d Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Mon, 30 Oct 2023 20:21:53 -0700 Subject: [PATCH 081/129] corrected template tags --- src/registrar/templates/application_tribal_government.html | 2 +- src/registrar/templates/includes/input_with_errors.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_tribal_government.html b/src/registrar/templates/application_tribal_government.html index 84a7d83b3..bdca60907 100644 --- a/src/registrar/templates/application_tribal_government.html +++ b/src/registrar/templates/application_tribal_government.html @@ -7,7 +7,7 @@ {% with sublabel_text="Please include the entire name of your tribe as recognized by the Bureau of Indian Affairs." %} {% with link_text="Bureau of Indian Affairs" %} {% with link_href="https://www.federalregister.gov/documents/2023/01/12/2023-00504/indian-entities-recognized-by-and-eligible-to-receive-services-from-the-united-states-bureau-of" %} - {% with class="usa-link usa-link--external" rel="noopener noreferrer" target_blank="true" %} + {% with external_link="true" target_blank="true" %} {% input_with_errors forms.0.tribe_name %} {% endwith %} {% endwith %} diff --git a/src/registrar/templates/includes/input_with_errors.html b/src/registrar/templates/includes/input_with_errors.html index 2adc08984..a7f15b9c8 100644 --- a/src/registrar/templates/includes/input_with_errors.html +++ b/src/registrar/templates/includes/input_with_errors.html @@ -37,7 +37,7 @@ error messages, if necessary. {% with link_index=sublabel_text|find_index:link_text %} {{ sublabel_text|slice:link_index }} {% comment %} HTML will convert a new line into a space, resulting with a space before the fullstop in case link_text is at the end of sublabel_text, hence the unfortunate line below {% endcomment %} - {{ link_text }}{% with sublabel_part_after=sublabel_text|slice_after:link_text %}{{ sublabel_part_after }}{% endwith %} + {{ link_text }}{% with sublabel_part_after=sublabel_text|slice_after:link_text %}{{ sublabel_part_after }}{% endwith %} {% endwith %} {% else %} {{ sublabel_text }} From 42781e4b731e3b0cc0a68d71a1d92a7bba516443 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Mon, 30 Oct 2023 22:25:35 -0700 Subject: [PATCH 082/129] corrected formatting in Authorizing official page and added rel tags to link in Tribal govt page --- src/registrar/templates/includes/ao_example.html | 2 +- src/registrar/templates/includes/input_with_errors.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/includes/ao_example.html b/src/registrar/templates/includes/ao_example.html index 13af78d3e..dfdbb3775 100644 --- a/src/registrar/templates/includes/ao_example.html +++ b/src/registrar/templates/includes/ao_example.html @@ -44,7 +44,7 @@

                          Domain requests from state legislatures and courts must be authorized by an agency’s Chief Information Officer or highest-ranking executive.

                          {% elif organization_type == 'tribal' %} -

                          Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

                          +

                          Domain requests from federally-recognized tribal governments must be authorized by the leader of the tribe, as recognized by the Bureau of Indian Affairs.

                          Domain requests from state-recognized tribal governments must be authorized by the leader of the tribe, as determined by the state’s tribal recognition initiative.

                          {% endif %} diff --git a/src/registrar/templates/includes/input_with_errors.html b/src/registrar/templates/includes/input_with_errors.html index a7f15b9c8..56bd0b111 100644 --- a/src/registrar/templates/includes/input_with_errors.html +++ b/src/registrar/templates/includes/input_with_errors.html @@ -37,7 +37,7 @@ error messages, if necessary. {% with link_index=sublabel_text|find_index:link_text %} {{ sublabel_text|slice:link_index }} {% comment %} HTML will convert a new line into a space, resulting with a space before the fullstop in case link_text is at the end of sublabel_text, hence the unfortunate line below {% endcomment %} - {{ link_text }}{% with sublabel_part_after=sublabel_text|slice_after:link_text %}{{ sublabel_part_after }}{% endwith %} + {{ link_text }}{% with sublabel_part_after=sublabel_text|slice_after:link_text %}{{ sublabel_part_after }}{% endwith %} {% endwith %} {% else %} {{ sublabel_text }} From 42c1f8ebc5272906936d1f128bcecbed3e05a6d4 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 31 Oct 2023 09:24:27 -0600 Subject: [PATCH 083/129] Update home.html --- src/registrar/templates/home.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/registrar/templates/home.html b/src/registrar/templates/home.html index e86c08c70..730430ffd 100644 --- a/src/registrar/templates/home.html +++ b/src/registrar/templates/home.html @@ -13,7 +13,11 @@

                          Manage your domains

                          - + Start a new domain request

                          From 5b2a78e4b08e887638f7017923d8956113f109f8 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Wed, 1 Nov 2023 15:41:19 -0700 Subject: [PATCH 084/129] main sync --- ops/manifests/manifest-stable.yaml | 4 +- ops/manifests/manifest-staging.yaml | 2 +- src/registrar/admin.py | 53 +++++ src/registrar/assets/js/get-gov.js | 103 ++++++--- src/registrar/assets/sass/_theme/_admin.scss | 45 ++++ src/registrar/config/settings.py | 30 ++- src/registrar/forms/domain.py | 21 +- .../django/admin/domain_change_list.html | 23 +++ .../templates/django/forms/label.html | 12 +- .../templates/domain_nameservers.html | 22 +- src/registrar/tests/test_reports.py | 195 ++++++++++++++++++ src/registrar/tests/test_views.py | 23 ++- src/registrar/utility/csv_export.py | 119 +++++++++++ src/registrar/utility/errors.py | 8 +- 14 files changed, 600 insertions(+), 60 deletions(-) create mode 100644 src/registrar/templates/django/admin/domain_change_list.html create mode 100644 src/registrar/tests/test_reports.py create mode 100644 src/registrar/utility/csv_export.py diff --git a/ops/manifests/manifest-stable.yaml b/ops/manifests/manifest-stable.yaml index 6295fa63b..e7b3c74ae 100644 --- a/ops/manifests/manifest-stable.yaml +++ b/ops/manifests/manifest-stable.yaml @@ -4,7 +4,7 @@ applications: buildpacks: - python_buildpack path: ../../src - instances: 1 + instances: 2 memory: 512M stack: cflinuxfs4 timeout: 180 @@ -23,6 +23,8 @@ applications: DJANGO_LOG_LEVEL: INFO # default public site location GETGOV_PUBLIC_SITE_URL: https://beta.get.gov + # Which OIDC provider to use + OIDC_ACTIVE_PROVIDER: login.gov production routes: - route: getgov-stable.app.cloud.gov services: diff --git a/ops/manifests/manifest-staging.yaml b/ops/manifests/manifest-staging.yaml index 3e80352ba..a1d09a555 100644 --- a/ops/manifests/manifest-staging.yaml +++ b/ops/manifests/manifest-staging.yaml @@ -4,7 +4,7 @@ applications: buildpacks: - python_buildpack path: ../../src - instances: 1 + instances: 2 memory: 512M stack: cflinuxfs4 timeout: 180 diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 904ce66a4..8914e5c87 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1,5 +1,6 @@ import logging from django import forms +from django.http import HttpResponse from django_fsm import get_available_FIELD_transitions from django.contrib import admin, messages from django.contrib.auth.admin import UserAdmin as BaseUserAdmin @@ -10,6 +11,7 @@ from django.urls import reverse from epplibwrapper.errors import ErrorCode, RegistryError from registrar.models.domain import Domain from registrar.models.utility.admin_sort_fields import AdminSortFields +from registrar.utility import csv_export from . import models from auditlog.models import LogEntry # type: ignore from auditlog.admin import LogEntryAdmin # type: ignore @@ -747,8 +749,59 @@ class DomainAdmin(ListHeaderAdmin): search_fields = ["name"] search_help_text = "Search by domain name." change_form_template = "django/admin/domain_change_form.html" + change_list_template = "django/admin/domain_change_list.html" readonly_fields = ["state"] + def export_data_type(self, request): + # match the CSV example with all the fields + response = HttpResponse(content_type="text/csv") + response["Content-Disposition"] = 'attachment; filename="domains-by-type.csv"' + csv_export.export_data_type_to_csv(response) + return response + + def export_data_full(self, request): + # Smaller export based on 1 + response = HttpResponse(content_type="text/csv") + response["Content-Disposition"] = 'attachment; filename="current-full.csv"' + csv_export.export_data_full_to_csv(response) + return response + + def export_data_federal(self, request): + # Federal only + response = HttpResponse(content_type="text/csv") + response["Content-Disposition"] = 'attachment; filename="current-federal.csv"' + csv_export.export_data_federal_to_csv(response) + return response + + def get_urls(self): + from django.urls import path + + urlpatterns = super().get_urls() + + # Used to extrapolate a path name, for instance + # name="{app_label}_{model_name}_export_data_type" + info = self.model._meta.app_label, self.model._meta.model_name + + my_url = [ + path( + "export_data_type/", + self.export_data_type, + name="%s_%s_export_data_type" % info, + ), + path( + "export_data_full/", + self.export_data_full, + name="%s_%s_export_data_full" % info, + ), + path( + "export_data_federal/", + self.export_data_federal, + name="%s_%s_export_data_federal" % info, + ), + ] + + return my_url + urlpatterns + def response_change(self, request, obj): # Create dictionary of action functions ACTION_FUNCTIONS = { diff --git a/src/registrar/assets/js/get-gov.js b/src/registrar/assets/js/get-gov.js index 1c678a4d6..b659b117e 100644 --- a/src/registrar/assets/js/get-gov.js +++ b/src/registrar/assets/js/get-gov.js @@ -273,31 +273,35 @@ function prepareDeleteButtons(formLabel) { // h2 and legend for DS form, label for nameservers Array.from(form.querySelectorAll('h2, legend, label, p')).forEach((node) => { - // Ticket: 1192 - // if (isNameserversForm && index <= 1 && !node.innerHTML.includes('*')) { - // // Create a new element - // const newElement = document.createElement('abbr'); - // newElement.textContent = '*'; - // // TODO: finish building abbr + // If the node is a nameserver label, one of the first 2 which was previously 3 and up (not required) + // inject the USWDS required markup and make sure the INPUT is required + if (isNameserversForm && index <= 1 && node.innerHTML.includes('server') && !node.innerHTML.includes('*')) { + // Create a new element + const newElement = document.createElement('abbr'); + newElement.textContent = '*'; + newElement.setAttribute("title", "required"); + newElement.classList.add("usa-hint", "usa-hint--required"); - // // Append the new element to the parent - // node.appendChild(newElement); - // // Find the next sibling that is an input element - // let nextInputElement = node.nextElementSibling; + // Append the new element to the label + node.appendChild(newElement); + // Find the next sibling that is an input element + let nextInputElement = node.nextElementSibling; - // while (nextInputElement) { - // if (nextInputElement.tagName === 'INPUT') { - // // Found the next input element - // console.log(nextInputElement); - // break; - // } - // nextInputElement = nextInputElement.nextElementSibling; - // } - // nextInputElement.required = true; - // } + while (nextInputElement) { + if (nextInputElement.tagName === 'INPUT') { + // Found the next input element + nextInputElement.setAttribute("required", "") + break; + } + nextInputElement = nextInputElement.nextElementSibling; + } + nextInputElement.required = true; + } - // Ticket: 1192 - remove if - if (!(isNameserversForm && index <= 1)) { + let innerSpan = node.querySelector('span') + if (innerSpan) { + innerSpan.textContent = innerSpan.textContent.replace(formLabelRegex, `${formLabel} ${index + 1}`); + } else { node.textContent = node.textContent.replace(formLabelRegex, `${formLabel} ${index + 1}`); node.textContent = node.textContent.replace(formExampleRegex, `ns${index + 1}`); } @@ -305,7 +309,15 @@ function prepareDeleteButtons(formLabel) { // Display the add more button if we have less than 13 forms if (isNameserversForm && forms.length <= 13) { - addButton.classList.remove("display-none") + console.log('remove disabled'); + addButton.removeAttribute("disabled"); + } + + if (isNameserversForm && forms.length < 3) { + // Hide the delete buttons on the remaining nameservers + Array.from(form.querySelectorAll('.delete-record')).forEach((deleteButton) => { + deleteButton.setAttribute("disabled", "true"); + }); } }); @@ -333,6 +345,11 @@ function prepareDeleteButtons(formLabel) { formLabel = "DS Data record"; } + // On load: Disable the add more button if we have 13 forms + if (isNameserversForm && document.querySelectorAll(".repeatable-form").length == 13) { + addButton.setAttribute("disabled", "true"); + } + // Attach click event listener on the delete buttons of the existing forms prepareDeleteButtons(formLabel); @@ -348,6 +365,33 @@ function prepareDeleteButtons(formLabel) { // For the eample on Nameservers let formExampleRegex = RegExp(`ns(\\d){1}`, 'g'); + // Some Nameserver form checks since the delete can mess up the source object we're copying + // in regards to required fields and hidden delete buttons + if (isNameserversForm) { + + // If the source element we're copying has required on an input, + // reset that input + let formRequiredNeedsCleanUp = newForm.innerHTML.includes('*'); + if (formRequiredNeedsCleanUp) { + newForm.querySelector('label abbr').remove(); + // Get all input elements within the container + const inputElements = newForm.querySelectorAll("input"); + // Loop through each input element and remove the 'required' attribute + inputElements.forEach((input) => { + if (input.hasAttribute("required")) { + input.removeAttribute("required"); + } + }); + } + + // If the source element we're copying has an disabled delete button, + // enable that button + let deleteButton= newForm.querySelector('.delete-record'); + if (deleteButton.hasAttribute("disabled")) { + deleteButton.removeAttribute("disabled"); + } + } + formNum++; newForm.innerHTML = newForm.innerHTML.replace(formNumberRegex, `form-${formNum-1}-`); newForm.innerHTML = newForm.innerHTML.replace(formLabelRegex, `${formLabel} ${formNum}`); @@ -397,9 +441,18 @@ function prepareDeleteButtons(formLabel) { // Attach click event listener on the delete buttons of the new form prepareDeleteButtons(formLabel); - // Hide the add more button if we have 13 forms + // Disable the add more button if we have 13 forms if (isNameserversForm && formNum == 13) { - addButton.classList.add("display-none") + addButton.setAttribute("disabled", "true"); + } + + if (isNameserversForm && forms.length >= 2) { + // Enable the delete buttons on the nameservers + forms.forEach((form, index) => { + Array.from(form.querySelectorAll('.delete-record')).forEach((deleteButton) => { + deleteButton.removeAttribute("disabled"); + }); + }); } } })(); diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index 35d089cbd..68ff51597 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -180,3 +180,48 @@ h1, h2, h3 { background: var(--primary); color: var(--header-link-color); } + +// Font mismatch issue due to conflicts between django and uswds, +// rough overrides for consistency and readability. May want to revise +// in the future +.object-tools li a, +.object-tools p a { + font-family: "Source Sans Pro Web", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + text-transform: capitalize!important; + font-size: 14px!important; +} + +// For consistency, make the overrided p a +// object tool buttons the same size as the ul li a +.object-tools p { + line-height: 1.25rem; +} + +// Fix margins in mobile view +@media (max-width: 767px) { + .object-tools li { + // our CSS is read before django's, so need !important + // to override + margin-left: 0!important; + margin-right: 15px; + } +} + +// Fix height of buttons +.object-tools li { + height: auto; +} + +// Fixing height of buttons breaks layout because +// object-tools and changelist are siblings with +// flexbox positioning +#changelist { + clear: both; +} + +// Account for the h2, roughly 90px +@include at-media(tablet) { + .object-tools { + padding-left: 90px; + } +} diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py index 3e5734dcc..e0dedb60c 100644 --- a/src/registrar/config/settings.py +++ b/src/registrar/config/settings.py @@ -49,6 +49,7 @@ env_debug = env.bool("DJANGO_DEBUG", default=False) env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG") env_base_url = env.str("DJANGO_BASE_URL") env_getgov_public_site_url = env.str("GETGOV_PUBLIC_SITE_URL", "") +env_oidc_active_provider = env.str("OIDC_ACTIVE_PROVIDER", "identity sandbox") secret_login_key = b64decode(secret("DJANGO_SECRET_LOGIN_KEY", "")) secret_key = secret("DJANGO_SECRET_KEY") @@ -370,8 +371,7 @@ LOGGING = { # each handler has its choice of format "formatters": { "verbose": { - "format": "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] " - "%(message)s", + "format": "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s", "datefmt": "%d/%b/%Y %H:%M:%S", }, "simple": { @@ -482,11 +482,12 @@ OIDC_ALLOW_DYNAMIC_OP = False # which provider to use if multiple are available # (code does not currently support user selection) -OIDC_ACTIVE_PROVIDER = "login.gov" +# See above for the default value if the env variable is missing +OIDC_ACTIVE_PROVIDER = env_oidc_active_provider OIDC_PROVIDERS = { - "login.gov": { + "identity sandbox": { "srv_discovery_url": "https://idp.int.identitysandbox.gov", "behaviour": { # the 'code' workflow requires direct connectivity from us to Login.gov @@ -502,7 +503,26 @@ OIDC_PROVIDERS = { "token_endpoint_auth_method": ["private_key_jwt"], "sp_private_key": secret_login_key, }, - } + }, + "login.gov production": { + "srv_discovery_url": "https://secure.login.gov", + "behaviour": { + # the 'code' workflow requires direct connectivity from us to Login.gov + "response_type": "code", + "scope": ["email", "profile:name", "phone"], + "user_info_request": ["email", "first_name", "last_name", "phone"], + "acr_value": "http://idmanagement.gov/ns/assurance/ial/2", + }, + "client_registration": { + "client_id": ( + "urn:gov:cisa:openidconnect.profiles:sp:sso:cisa:dotgov_registrar" + ), + "redirect_uris": [f"{env_base_url}/openid/callback/login/"], + "post_logout_redirect_uris": [f"{env_base_url}/openid/callback/logout/"], + "token_endpoint_auth_method": ["private_key_jwt"], + "sp_private_key": secret_login_key, + }, + }, } # endregion diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index 3aca7af6d..d48a14c6b 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -23,11 +23,6 @@ class DomainAddUserForm(forms.Form): email = forms.EmailField(label="Email") -class IPAddressField(forms.CharField): - def validate(self, value): - super().validate(value) # Run the default CharField validation - - class DomainNameserverForm(forms.Form): """Form for changing nameservers.""" @@ -35,7 +30,21 @@ class DomainNameserverForm(forms.Form): server = forms.CharField(label="Name server", strip=True) - ip = forms.CharField(label="IP Address (IPv4 or IPv6)", strip=True, required=False) + ip = forms.CharField( + label="IP address (IPv4 or IPv6)", + strip=True, + required=False, + ) + + def __init__(self, *args, **kwargs): + super(DomainNameserverForm, self).__init__(*args, **kwargs) + + # add custom error messages + self.fields["server"].error_messages.update( + { + "required": "A minimum of 2 name servers are required.", + } + ) def clean(self): # clean is called from clean_forms, which is called from is_valid diff --git a/src/registrar/templates/django/admin/domain_change_list.html b/src/registrar/templates/django/admin/domain_change_list.html new file mode 100644 index 000000000..68fdbe7aa --- /dev/null +++ b/src/registrar/templates/django/admin/domain_change_list.html @@ -0,0 +1,23 @@ +{% extends "admin/change_list.html" %} + +{% block object-tools %} + + +{% endblock %} \ No newline at end of file diff --git a/src/registrar/templates/django/forms/label.html b/src/registrar/templates/django/forms/label.html index 6881922f2..da90a372a 100644 --- a/src/registrar/templates/django/forms/label.html +++ b/src/registrar/templates/django/forms/label.html @@ -2,8 +2,12 @@ class="{% if label_classes %} {{ label_classes }}{% endif %}{% if label_tag == 'legend' %} {{ legend_classes }}{% endif %}" {% if not field.use_fieldset %}for="{{ widget.attrs.id }}"{% endif %} > -{{ field.label }} -{% if widget.attrs.required %} - * -{% endif %} + {% if span_for_text %} + {{ field.label }} + {% else %} + {{ field.label }} + {% endif %} + {% if widget.attrs.required %} + * + {% endif %} diff --git a/src/registrar/templates/domain_nameservers.html b/src/registrar/templates/domain_nameservers.html index d00126698..55519ef67 100644 --- a/src/registrar/templates/domain_nameservers.html +++ b/src/registrar/templates/domain_nameservers.html @@ -35,11 +35,14 @@ {{ form.domain }} {% with sublabel_text="Example: ns"|concat:forloop.counter|concat:".example.com" %} {% if forloop.counter <= 2 %} - {% with attr_required=True add_group_class="usa-form-group--unstyled-error" %} + {# span_for_text will wrap the copy in s , which we'll use in the JS for this component #} + {% with attr_required=True add_group_class="usa-form-group--unstyled-error" span_for_text=True %} {% input_with_errors form.server %} {% endwith %} {% else %} - {% input_with_errors form.server %} + {% with span_for_text=True %} + {% input_with_errors form.server %} + {% endwith %} {% endif %} {% endwith %} @@ -49,14 +52,11 @@ {% endwith %}
                          - {% comment %} TODO: remove this if for 1192 {% endcomment %} - {% if forloop.counter > 2 %} - - {% endif %} +
                          @@ -81,7 +81,7 @@ type="submit" class="usa-button usa-button--outline" name="btn-cancel-click" - aria-label="Reset the data in the Name Server form to the registry state (undo changes)" + aria-label="Reset the data in the name server form to the registry state (undo changes)" >Cancel diff --git a/src/registrar/tests/test_reports.py b/src/registrar/tests/test_reports.py new file mode 100644 index 000000000..404ed358c --- /dev/null +++ b/src/registrar/tests/test_reports.py @@ -0,0 +1,195 @@ +from django.test import TestCase +from io import StringIO +import csv +from registrar.models.domain_information import DomainInformation +from registrar.models.domain import Domain +from registrar.models.user import User +from django.contrib.auth import get_user_model +from registrar.utility.csv_export import export_domains_to_writer + + +class ExportDataTest(TestCase): + def setUp(self): + username = "test_user" + first_name = "First" + last_name = "Last" + email = "info@example.com" + self.user = get_user_model().objects.create( + username=username, first_name=first_name, last_name=last_name, email=email + ) + + self.domain_1, _ = Domain.objects.get_or_create( + name="cdomain1.gov", state=Domain.State.READY + ) + self.domain_2, _ = Domain.objects.get_or_create( + name="adomain2.gov", state=Domain.State.DNS_NEEDED + ) + self.domain_3, _ = Domain.objects.get_or_create( + name="ddomain3.gov", state=Domain.State.ON_HOLD + ) + self.domain_4, _ = Domain.objects.get_or_create( + name="bdomain4.gov", state=Domain.State.UNKNOWN + ) + self.domain_4, _ = Domain.objects.get_or_create( + name="bdomain4.gov", state=Domain.State.UNKNOWN + ) + + self.domain_information_1, _ = DomainInformation.objects.get_or_create( + creator=self.user, + domain=self.domain_1, + organization_type="federal", + federal_agency="World War I Centennial Commission", + federal_type="executive", + ) + self.domain_information_2, _ = DomainInformation.objects.get_or_create( + creator=self.user, + domain=self.domain_2, + organization_type="interstate", + ) + self.domain_information_3, _ = DomainInformation.objects.get_or_create( + creator=self.user, + domain=self.domain_3, + organization_type="federal", + federal_agency="Armed Forces Retirement Home", + ) + self.domain_information_4, _ = DomainInformation.objects.get_or_create( + creator=self.user, + domain=self.domain_4, + organization_type="federal", + federal_agency="Armed Forces Retirement Home", + ) + + def tearDown(self): + Domain.objects.all().delete() + DomainInformation.objects.all().delete() + User.objects.all().delete() + super().tearDown() + + def test_export_domains_to_writer(self): + """Test that export_domains_to_writer returns the + existing domain, test that sort by domain name works, + test that filter works""" + # Create a CSV file in memory + csv_file = StringIO() + writer = csv.writer(csv_file) + + # Define columns, sort fields, and filter condition + columns = [ + "Domain name", + "Domain type", + "Agency", + "Organization name", + "City", + "State", + "AO", + "AO email", + "Submitter", + "Submitter title", + "Submitter email", + "Submitter phone", + "Security Contact Email", + "Status", + ] + sort_fields = ["domain__name"] + filter_condition = { + "domain__state__in": [ + Domain.State.READY, + Domain.State.DNS_NEEDED, + Domain.State.ON_HOLD, + ], + } + + # Call the export function + export_domains_to_writer(writer, columns, sort_fields, filter_condition) + + # Reset the CSV file's position to the beginning + csv_file.seek(0) + + # Read the content into a variable + csv_content = csv_file.read() + + # We expect READY domains, + # sorted alphabetially by domain name + expected_content = ( + "Domain name,Domain type,Agency,Organization name,City,State,AO," + "AO email,Submitter,Submitter title,Submitter email,Submitter phone," + "Security Contact Email,Status\n" + "adomain2.gov,Interstate,dnsneeded\n" + "cdomain1.gov,Federal - Executive,World War I Centennial Commission,ready\n" + "ddomain3.gov,Federal,Armed Forces Retirement Home,onhold\n" + ) + + # Normalize line endings and remove commas, + # spaces and leading/trailing whitespace + csv_content = ( + csv_content.replace(",,", "") + .replace(",", "") + .replace(" ", "") + .replace("\r\n", "\n") + .strip() + ) + expected_content = ( + expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip() + ) + + self.assertEqual(csv_content, expected_content) + + def test_export_domains_to_writer_additional(self): + """An additional test for filters and multi-column sort""" + # Create a CSV file in memory + csv_file = StringIO() + writer = csv.writer(csv_file) + + # Define columns, sort fields, and filter condition + columns = [ + "Domain name", + "Domain type", + "Agency", + "Organization name", + "City", + "State", + "Security Contact Email", + ] + sort_fields = ["domain__name", "federal_agency", "organization_type"] + filter_condition = { + "organization_type__icontains": "federal", + "domain__state__in": [ + Domain.State.READY, + Domain.State.DNS_NEEDED, + Domain.State.ON_HOLD, + ], + } + + # Call the export function + export_domains_to_writer(writer, columns, sort_fields, filter_condition) + + # Reset the CSV file's position to the beginning + csv_file.seek(0) + + # Read the content into a variable + csv_content = csv_file.read() + + # We expect READY domains, + # federal only + # sorted alphabetially by domain name + expected_content = ( + "Domain name,Domain type,Agency,Organization name,City," + "State,Security Contact Email\n" + "cdomain1.gov,Federal - Executive,World War I Centennial Commission\n" + "ddomain3.gov,Federal,Armed Forces Retirement Home\n" + ) + + # Normalize line endings and remove commas, + # spaces and leading/trailing whitespace + csv_content = ( + csv_content.replace(",,", "") + .replace(",", "") + .replace(" ", "") + .replace("\r\n", "\n") + .strip() + ) + expected_content = ( + expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip() + ) + + self.assertEqual(csv_content, expected_content) diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index 95af4c542..92fd5af44 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -1170,6 +1170,7 @@ class TestWithDomainPermissions(TestWithUser): if hasattr(self.domain, "contacts"): self.domain.contacts.all().delete() DomainApplication.objects.all().delete() + DomainInformation.objects.all().delete() PublicContact.objects.all().delete() Domain.objects.all().delete() UserDomainRole.objects.all().delete() @@ -1464,7 +1465,12 @@ class TestDomainNameservers(TestDomainOverview): # form submission was a post with an error, response should be a 200 # error text appears twice, once at the top of the page, once around # the required field. form requires a minimum of 2 name servers - self.assertContains(result, "This field is required.", count=2, status_code=200) + self.assertContains( + result, + "A minimum of 2 name servers are required.", + count=2, + status_code=200, + ) def test_domain_nameservers_form_submit_subdomain_missing_ip(self): """Nameserver form catches missing ip error on subdomain. @@ -1632,7 +1638,12 @@ class TestDomainNameservers(TestDomainOverview): # form submission was a post with an error, response should be a 200 # error text appears four times, twice at the top of the page, # once around each required field. - self.assertContains(result, "This field is required", count=4, status_code=200) + self.assertContains( + result, + "A minimum of 2 name servers are required.", + count=4, + status_code=200, + ) class TestDomainAuthorizingOfficial(TestDomainOverview): @@ -1800,7 +1811,11 @@ class TestDomainSecurityEmail(TestDomainOverview): ( "RegistryError", form_data_registry_error, - "Update failed. Cannot contact the registry.", + """ +We’re experiencing a system connection error. Please wait a few minutes +and try again. If you continue to receive this error after a few tries, +contact help@get.gov + """, ), ("ContactError", form_data_contact_error, "Value entered was wrong."), ( @@ -1835,7 +1850,7 @@ class TestDomainSecurityEmail(TestDomainOverview): self.assertEqual(len(messages), 1) message = messages[0] self.assertEqual(message.tags, message_tag) - self.assertEqual(message.message, expected_message) + self.assertEqual(message.message.strip(), expected_message.strip()) def test_domain_overview_blocked_for_ineligible_user(self): """We could easily duplicate this test for all domain management diff --git a/src/registrar/utility/csv_export.py b/src/registrar/utility/csv_export.py new file mode 100644 index 000000000..ffada0a0b --- /dev/null +++ b/src/registrar/utility/csv_export.py @@ -0,0 +1,119 @@ +import csv +from registrar.models.domain import Domain +from registrar.models.domain_information import DomainInformation +from registrar.models.public_contact import PublicContact + + +def export_domains_to_writer(writer, columns, sort_fields, filter_condition): + # write columns headers to writer + writer.writerow(columns) + + domainInfos = DomainInformation.objects.filter(**filter_condition).order_by( + *sort_fields + ) + for domainInfo in domainInfos: + security_contacts = domainInfo.domain.contacts.filter( + contact_type=PublicContact.ContactTypeChoices.SECURITY + ) + + # create a dictionary of fields which can be included in output + FIELDS = { + "Domain name": domainInfo.domain.name, + "Domain type": domainInfo.get_organization_type_display() + + " - " + + domainInfo.get_federal_type_display() + if domainInfo.federal_type + else domainInfo.get_organization_type_display(), + "Agency": domainInfo.federal_agency, + "Organization name": domainInfo.organization_name, + "City": domainInfo.city, + "State": domainInfo.state_territory, + "AO": domainInfo.authorizing_official.first_name + + " " + + domainInfo.authorizing_official.last_name + if domainInfo.authorizing_official + else " ", + "AO email": domainInfo.authorizing_official.email + if domainInfo.authorizing_official + else " ", + "Security Contact Email": security_contacts[0].email + if security_contacts + else " ", + "Status": domainInfo.domain.state, + "Expiration Date": domainInfo.domain.expiration_date, + } + writer.writerow([FIELDS.get(column, "") for column in columns]) + + +def export_data_type_to_csv(csv_file): + writer = csv.writer(csv_file) + # define columns to include in export + columns = [ + "Domain name", + "Domain type", + "Agency", + "Organization name", + "City", + "State", + "AO", + "AO email", + "Security Contact Email", + "Status", + "Expiration Date", + ] + sort_fields = ["domain__name"] + filter_condition = { + "domain__state__in": [ + Domain.State.READY, + Domain.State.DNS_NEEDED, + Domain.State.ON_HOLD, + ], + } + export_domains_to_writer(writer, columns, sort_fields, filter_condition) + + +def export_data_full_to_csv(csv_file): + writer = csv.writer(csv_file) + # define columns to include in export + columns = [ + "Domain name", + "Domain type", + "Agency", + "Organization name", + "City", + "State", + "Security Contact Email", + ] + sort_fields = ["domain__name", "federal_agency", "organization_type"] + filter_condition = { + "domain__state__in": [ + Domain.State.READY, + Domain.State.DNS_NEEDED, + Domain.State.ON_HOLD, + ], + } + export_domains_to_writer(writer, columns, sort_fields, filter_condition) + + +def export_data_federal_to_csv(csv_file): + writer = csv.writer(csv_file) + # define columns to include in export + columns = [ + "Domain name", + "Domain type", + "Agency", + "Organization name", + "City", + "State", + "Security Contact Email", + ] + sort_fields = ["domain__name", "federal_agency", "organization_type"] + filter_condition = { + "organization_type__icontains": "federal", + "domain__state__in": [ + Domain.State.READY, + Domain.State.DNS_NEEDED, + Domain.State.ON_HOLD, + ], + } + export_domains_to_writer(writer, columns, sort_fields, filter_condition) diff --git a/src/registrar/utility/errors.py b/src/registrar/utility/errors.py index c1d3c5849..5d62953ac 100644 --- a/src/registrar/utility/errors.py +++ b/src/registrar/utility/errors.py @@ -39,9 +39,11 @@ class GenericError(Exception): """ _error_mapping = { - GenericErrorCodes.CANNOT_CONTACT_REGISTRY: ( - "Update failed. Cannot contact the registry." - ), + GenericErrorCodes.CANNOT_CONTACT_REGISTRY: """ +We’re experiencing a system connection error. Please wait a few minutes +and try again. If you continue to receive this error after a few tries, +contact help@get.gov + """, GenericErrorCodes.GENERIC_ERROR: ("Value entered was wrong."), } From a418de2a855de10e1d8c431664cec2fabadbc74c Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Wed, 1 Nov 2023 15:53:01 -0700 Subject: [PATCH 085/129] revert changes --- ops/manifests/manifest-stable.yaml | 4 +- ops/manifests/manifest-staging.yaml | 2 +- src/registrar/admin.py | 53 ----- src/registrar/assets/js/get-gov.js | 103 +++------ src/registrar/assets/sass/_theme/_admin.scss | 45 ---- src/registrar/config/settings.py | 30 +-- src/registrar/forms/domain.py | 21 +- .../django/admin/domain_change_list.html | 23 --- .../templates/django/forms/label.html | 12 +- .../templates/domain_nameservers.html | 22 +- src/registrar/tests/test_reports.py | 195 ------------------ src/registrar/tests/test_views.py | 23 +-- src/registrar/utility/csv_export.py | 119 ----------- src/registrar/utility/errors.py | 8 +- 14 files changed, 60 insertions(+), 600 deletions(-) delete mode 100644 src/registrar/templates/django/admin/domain_change_list.html delete mode 100644 src/registrar/tests/test_reports.py delete mode 100644 src/registrar/utility/csv_export.py diff --git a/ops/manifests/manifest-stable.yaml b/ops/manifests/manifest-stable.yaml index e7b3c74ae..6295fa63b 100644 --- a/ops/manifests/manifest-stable.yaml +++ b/ops/manifests/manifest-stable.yaml @@ -4,7 +4,7 @@ applications: buildpacks: - python_buildpack path: ../../src - instances: 2 + instances: 1 memory: 512M stack: cflinuxfs4 timeout: 180 @@ -23,8 +23,6 @@ applications: DJANGO_LOG_LEVEL: INFO # default public site location GETGOV_PUBLIC_SITE_URL: https://beta.get.gov - # Which OIDC provider to use - OIDC_ACTIVE_PROVIDER: login.gov production routes: - route: getgov-stable.app.cloud.gov services: diff --git a/ops/manifests/manifest-staging.yaml b/ops/manifests/manifest-staging.yaml index a1d09a555..3e80352ba 100644 --- a/ops/manifests/manifest-staging.yaml +++ b/ops/manifests/manifest-staging.yaml @@ -4,7 +4,7 @@ applications: buildpacks: - python_buildpack path: ../../src - instances: 2 + instances: 1 memory: 512M stack: cflinuxfs4 timeout: 180 diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 8914e5c87..904ce66a4 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1,6 +1,5 @@ import logging from django import forms -from django.http import HttpResponse from django_fsm import get_available_FIELD_transitions from django.contrib import admin, messages from django.contrib.auth.admin import UserAdmin as BaseUserAdmin @@ -11,7 +10,6 @@ from django.urls import reverse from epplibwrapper.errors import ErrorCode, RegistryError from registrar.models.domain import Domain from registrar.models.utility.admin_sort_fields import AdminSortFields -from registrar.utility import csv_export from . import models from auditlog.models import LogEntry # type: ignore from auditlog.admin import LogEntryAdmin # type: ignore @@ -749,59 +747,8 @@ class DomainAdmin(ListHeaderAdmin): search_fields = ["name"] search_help_text = "Search by domain name." change_form_template = "django/admin/domain_change_form.html" - change_list_template = "django/admin/domain_change_list.html" readonly_fields = ["state"] - def export_data_type(self, request): - # match the CSV example with all the fields - response = HttpResponse(content_type="text/csv") - response["Content-Disposition"] = 'attachment; filename="domains-by-type.csv"' - csv_export.export_data_type_to_csv(response) - return response - - def export_data_full(self, request): - # Smaller export based on 1 - response = HttpResponse(content_type="text/csv") - response["Content-Disposition"] = 'attachment; filename="current-full.csv"' - csv_export.export_data_full_to_csv(response) - return response - - def export_data_federal(self, request): - # Federal only - response = HttpResponse(content_type="text/csv") - response["Content-Disposition"] = 'attachment; filename="current-federal.csv"' - csv_export.export_data_federal_to_csv(response) - return response - - def get_urls(self): - from django.urls import path - - urlpatterns = super().get_urls() - - # Used to extrapolate a path name, for instance - # name="{app_label}_{model_name}_export_data_type" - info = self.model._meta.app_label, self.model._meta.model_name - - my_url = [ - path( - "export_data_type/", - self.export_data_type, - name="%s_%s_export_data_type" % info, - ), - path( - "export_data_full/", - self.export_data_full, - name="%s_%s_export_data_full" % info, - ), - path( - "export_data_federal/", - self.export_data_federal, - name="%s_%s_export_data_federal" % info, - ), - ] - - return my_url + urlpatterns - def response_change(self, request, obj): # Create dictionary of action functions ACTION_FUNCTIONS = { diff --git a/src/registrar/assets/js/get-gov.js b/src/registrar/assets/js/get-gov.js index b659b117e..1c678a4d6 100644 --- a/src/registrar/assets/js/get-gov.js +++ b/src/registrar/assets/js/get-gov.js @@ -273,35 +273,31 @@ function prepareDeleteButtons(formLabel) { // h2 and legend for DS form, label for nameservers Array.from(form.querySelectorAll('h2, legend, label, p')).forEach((node) => { - // If the node is a nameserver label, one of the first 2 which was previously 3 and up (not required) - // inject the USWDS required markup and make sure the INPUT is required - if (isNameserversForm && index <= 1 && node.innerHTML.includes('server') && !node.innerHTML.includes('*')) { - // Create a new element - const newElement = document.createElement('abbr'); - newElement.textContent = '*'; - newElement.setAttribute("title", "required"); - newElement.classList.add("usa-hint", "usa-hint--required"); + // Ticket: 1192 + // if (isNameserversForm && index <= 1 && !node.innerHTML.includes('*')) { + // // Create a new element + // const newElement = document.createElement('abbr'); + // newElement.textContent = '*'; + // // TODO: finish building abbr - // Append the new element to the label - node.appendChild(newElement); - // Find the next sibling that is an input element - let nextInputElement = node.nextElementSibling; + // // Append the new element to the parent + // node.appendChild(newElement); + // // Find the next sibling that is an input element + // let nextInputElement = node.nextElementSibling; - while (nextInputElement) { - if (nextInputElement.tagName === 'INPUT') { - // Found the next input element - nextInputElement.setAttribute("required", "") - break; - } - nextInputElement = nextInputElement.nextElementSibling; - } - nextInputElement.required = true; - } + // while (nextInputElement) { + // if (nextInputElement.tagName === 'INPUT') { + // // Found the next input element + // console.log(nextInputElement); + // break; + // } + // nextInputElement = nextInputElement.nextElementSibling; + // } + // nextInputElement.required = true; + // } - let innerSpan = node.querySelector('span') - if (innerSpan) { - innerSpan.textContent = innerSpan.textContent.replace(formLabelRegex, `${formLabel} ${index + 1}`); - } else { + // Ticket: 1192 - remove if + if (!(isNameserversForm && index <= 1)) { node.textContent = node.textContent.replace(formLabelRegex, `${formLabel} ${index + 1}`); node.textContent = node.textContent.replace(formExampleRegex, `ns${index + 1}`); } @@ -309,15 +305,7 @@ function prepareDeleteButtons(formLabel) { // Display the add more button if we have less than 13 forms if (isNameserversForm && forms.length <= 13) { - console.log('remove disabled'); - addButton.removeAttribute("disabled"); - } - - if (isNameserversForm && forms.length < 3) { - // Hide the delete buttons on the remaining nameservers - Array.from(form.querySelectorAll('.delete-record')).forEach((deleteButton) => { - deleteButton.setAttribute("disabled", "true"); - }); + addButton.classList.remove("display-none") } }); @@ -345,11 +333,6 @@ function prepareDeleteButtons(formLabel) { formLabel = "DS Data record"; } - // On load: Disable the add more button if we have 13 forms - if (isNameserversForm && document.querySelectorAll(".repeatable-form").length == 13) { - addButton.setAttribute("disabled", "true"); - } - // Attach click event listener on the delete buttons of the existing forms prepareDeleteButtons(formLabel); @@ -365,33 +348,6 @@ function prepareDeleteButtons(formLabel) { // For the eample on Nameservers let formExampleRegex = RegExp(`ns(\\d){1}`, 'g'); - // Some Nameserver form checks since the delete can mess up the source object we're copying - // in regards to required fields and hidden delete buttons - if (isNameserversForm) { - - // If the source element we're copying has required on an input, - // reset that input - let formRequiredNeedsCleanUp = newForm.innerHTML.includes('*'); - if (formRequiredNeedsCleanUp) { - newForm.querySelector('label abbr').remove(); - // Get all input elements within the container - const inputElements = newForm.querySelectorAll("input"); - // Loop through each input element and remove the 'required' attribute - inputElements.forEach((input) => { - if (input.hasAttribute("required")) { - input.removeAttribute("required"); - } - }); - } - - // If the source element we're copying has an disabled delete button, - // enable that button - let deleteButton= newForm.querySelector('.delete-record'); - if (deleteButton.hasAttribute("disabled")) { - deleteButton.removeAttribute("disabled"); - } - } - formNum++; newForm.innerHTML = newForm.innerHTML.replace(formNumberRegex, `form-${formNum-1}-`); newForm.innerHTML = newForm.innerHTML.replace(formLabelRegex, `${formLabel} ${formNum}`); @@ -441,18 +397,9 @@ function prepareDeleteButtons(formLabel) { // Attach click event listener on the delete buttons of the new form prepareDeleteButtons(formLabel); - // Disable the add more button if we have 13 forms + // Hide the add more button if we have 13 forms if (isNameserversForm && formNum == 13) { - addButton.setAttribute("disabled", "true"); - } - - if (isNameserversForm && forms.length >= 2) { - // Enable the delete buttons on the nameservers - forms.forEach((form, index) => { - Array.from(form.querySelectorAll('.delete-record')).forEach((deleteButton) => { - deleteButton.removeAttribute("disabled"); - }); - }); + addButton.classList.add("display-none") } } })(); diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index 68ff51597..35d089cbd 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -180,48 +180,3 @@ h1, h2, h3 { background: var(--primary); color: var(--header-link-color); } - -// Font mismatch issue due to conflicts between django and uswds, -// rough overrides for consistency and readability. May want to revise -// in the future -.object-tools li a, -.object-tools p a { - font-family: "Source Sans Pro Web", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; - text-transform: capitalize!important; - font-size: 14px!important; -} - -// For consistency, make the overrided p a -// object tool buttons the same size as the ul li a -.object-tools p { - line-height: 1.25rem; -} - -// Fix margins in mobile view -@media (max-width: 767px) { - .object-tools li { - // our CSS is read before django's, so need !important - // to override - margin-left: 0!important; - margin-right: 15px; - } -} - -// Fix height of buttons -.object-tools li { - height: auto; -} - -// Fixing height of buttons breaks layout because -// object-tools and changelist are siblings with -// flexbox positioning -#changelist { - clear: both; -} - -// Account for the h2, roughly 90px -@include at-media(tablet) { - .object-tools { - padding-left: 90px; - } -} diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py index e0dedb60c..3e5734dcc 100644 --- a/src/registrar/config/settings.py +++ b/src/registrar/config/settings.py @@ -49,7 +49,6 @@ env_debug = env.bool("DJANGO_DEBUG", default=False) env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG") env_base_url = env.str("DJANGO_BASE_URL") env_getgov_public_site_url = env.str("GETGOV_PUBLIC_SITE_URL", "") -env_oidc_active_provider = env.str("OIDC_ACTIVE_PROVIDER", "identity sandbox") secret_login_key = b64decode(secret("DJANGO_SECRET_LOGIN_KEY", "")) secret_key = secret("DJANGO_SECRET_KEY") @@ -371,7 +370,8 @@ LOGGING = { # each handler has its choice of format "formatters": { "verbose": { - "format": "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s", + "format": "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] " + "%(message)s", "datefmt": "%d/%b/%Y %H:%M:%S", }, "simple": { @@ -482,12 +482,11 @@ OIDC_ALLOW_DYNAMIC_OP = False # which provider to use if multiple are available # (code does not currently support user selection) -# See above for the default value if the env variable is missing -OIDC_ACTIVE_PROVIDER = env_oidc_active_provider +OIDC_ACTIVE_PROVIDER = "login.gov" OIDC_PROVIDERS = { - "identity sandbox": { + "login.gov": { "srv_discovery_url": "https://idp.int.identitysandbox.gov", "behaviour": { # the 'code' workflow requires direct connectivity from us to Login.gov @@ -503,26 +502,7 @@ OIDC_PROVIDERS = { "token_endpoint_auth_method": ["private_key_jwt"], "sp_private_key": secret_login_key, }, - }, - "login.gov production": { - "srv_discovery_url": "https://secure.login.gov", - "behaviour": { - # the 'code' workflow requires direct connectivity from us to Login.gov - "response_type": "code", - "scope": ["email", "profile:name", "phone"], - "user_info_request": ["email", "first_name", "last_name", "phone"], - "acr_value": "http://idmanagement.gov/ns/assurance/ial/2", - }, - "client_registration": { - "client_id": ( - "urn:gov:cisa:openidconnect.profiles:sp:sso:cisa:dotgov_registrar" - ), - "redirect_uris": [f"{env_base_url}/openid/callback/login/"], - "post_logout_redirect_uris": [f"{env_base_url}/openid/callback/logout/"], - "token_endpoint_auth_method": ["private_key_jwt"], - "sp_private_key": secret_login_key, - }, - }, + } } # endregion diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index d48a14c6b..3aca7af6d 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -23,6 +23,11 @@ class DomainAddUserForm(forms.Form): email = forms.EmailField(label="Email") +class IPAddressField(forms.CharField): + def validate(self, value): + super().validate(value) # Run the default CharField validation + + class DomainNameserverForm(forms.Form): """Form for changing nameservers.""" @@ -30,21 +35,7 @@ class DomainNameserverForm(forms.Form): server = forms.CharField(label="Name server", strip=True) - ip = forms.CharField( - label="IP address (IPv4 or IPv6)", - strip=True, - required=False, - ) - - def __init__(self, *args, **kwargs): - super(DomainNameserverForm, self).__init__(*args, **kwargs) - - # add custom error messages - self.fields["server"].error_messages.update( - { - "required": "A minimum of 2 name servers are required.", - } - ) + ip = forms.CharField(label="IP Address (IPv4 or IPv6)", strip=True, required=False) def clean(self): # clean is called from clean_forms, which is called from is_valid diff --git a/src/registrar/templates/django/admin/domain_change_list.html b/src/registrar/templates/django/admin/domain_change_list.html deleted file mode 100644 index 68fdbe7aa..000000000 --- a/src/registrar/templates/django/admin/domain_change_list.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "admin/change_list.html" %} - -{% block object-tools %} - - -{% endblock %} \ No newline at end of file diff --git a/src/registrar/templates/django/forms/label.html b/src/registrar/templates/django/forms/label.html index da90a372a..6881922f2 100644 --- a/src/registrar/templates/django/forms/label.html +++ b/src/registrar/templates/django/forms/label.html @@ -2,12 +2,8 @@ class="{% if label_classes %} {{ label_classes }}{% endif %}{% if label_tag == 'legend' %} {{ legend_classes }}{% endif %}" {% if not field.use_fieldset %}for="{{ widget.attrs.id }}"{% endif %} > - {% if span_for_text %} - {{ field.label }} - {% else %} - {{ field.label }} - {% endif %} - {% if widget.attrs.required %} - * - {% endif %} +{{ field.label }} +{% if widget.attrs.required %} + * +{% endif %} diff --git a/src/registrar/templates/domain_nameservers.html b/src/registrar/templates/domain_nameservers.html index 55519ef67..d00126698 100644 --- a/src/registrar/templates/domain_nameservers.html +++ b/src/registrar/templates/domain_nameservers.html @@ -35,14 +35,11 @@ {{ form.domain }} {% with sublabel_text="Example: ns"|concat:forloop.counter|concat:".example.com" %} {% if forloop.counter <= 2 %} - {# span_for_text will wrap the copy in s , which we'll use in the JS for this component #} - {% with attr_required=True add_group_class="usa-form-group--unstyled-error" span_for_text=True %} + {% with attr_required=True add_group_class="usa-form-group--unstyled-error" %} {% input_with_errors form.server %} {% endwith %} {% else %} - {% with span_for_text=True %} - {% input_with_errors form.server %} - {% endwith %} + {% input_with_errors form.server %} {% endif %} {% endwith %} @@ -52,11 +49,14 @@ {% endwith %}
                          - + {% comment %} TODO: remove this if for 1192 {% endcomment %} + {% if forloop.counter > 2 %} + + {% endif %}
                          @@ -81,7 +81,7 @@ type="submit" class="usa-button usa-button--outline" name="btn-cancel-click" - aria-label="Reset the data in the name server form to the registry state (undo changes)" + aria-label="Reset the data in the Name Server form to the registry state (undo changes)" >Cancel diff --git a/src/registrar/tests/test_reports.py b/src/registrar/tests/test_reports.py deleted file mode 100644 index 404ed358c..000000000 --- a/src/registrar/tests/test_reports.py +++ /dev/null @@ -1,195 +0,0 @@ -from django.test import TestCase -from io import StringIO -import csv -from registrar.models.domain_information import DomainInformation -from registrar.models.domain import Domain -from registrar.models.user import User -from django.contrib.auth import get_user_model -from registrar.utility.csv_export import export_domains_to_writer - - -class ExportDataTest(TestCase): - def setUp(self): - username = "test_user" - first_name = "First" - last_name = "Last" - email = "info@example.com" - self.user = get_user_model().objects.create( - username=username, first_name=first_name, last_name=last_name, email=email - ) - - self.domain_1, _ = Domain.objects.get_or_create( - name="cdomain1.gov", state=Domain.State.READY - ) - self.domain_2, _ = Domain.objects.get_or_create( - name="adomain2.gov", state=Domain.State.DNS_NEEDED - ) - self.domain_3, _ = Domain.objects.get_or_create( - name="ddomain3.gov", state=Domain.State.ON_HOLD - ) - self.domain_4, _ = Domain.objects.get_or_create( - name="bdomain4.gov", state=Domain.State.UNKNOWN - ) - self.domain_4, _ = Domain.objects.get_or_create( - name="bdomain4.gov", state=Domain.State.UNKNOWN - ) - - self.domain_information_1, _ = DomainInformation.objects.get_or_create( - creator=self.user, - domain=self.domain_1, - organization_type="federal", - federal_agency="World War I Centennial Commission", - federal_type="executive", - ) - self.domain_information_2, _ = DomainInformation.objects.get_or_create( - creator=self.user, - domain=self.domain_2, - organization_type="interstate", - ) - self.domain_information_3, _ = DomainInformation.objects.get_or_create( - creator=self.user, - domain=self.domain_3, - organization_type="federal", - federal_agency="Armed Forces Retirement Home", - ) - self.domain_information_4, _ = DomainInformation.objects.get_or_create( - creator=self.user, - domain=self.domain_4, - organization_type="federal", - federal_agency="Armed Forces Retirement Home", - ) - - def tearDown(self): - Domain.objects.all().delete() - DomainInformation.objects.all().delete() - User.objects.all().delete() - super().tearDown() - - def test_export_domains_to_writer(self): - """Test that export_domains_to_writer returns the - existing domain, test that sort by domain name works, - test that filter works""" - # Create a CSV file in memory - csv_file = StringIO() - writer = csv.writer(csv_file) - - # Define columns, sort fields, and filter condition - columns = [ - "Domain name", - "Domain type", - "Agency", - "Organization name", - "City", - "State", - "AO", - "AO email", - "Submitter", - "Submitter title", - "Submitter email", - "Submitter phone", - "Security Contact Email", - "Status", - ] - sort_fields = ["domain__name"] - filter_condition = { - "domain__state__in": [ - Domain.State.READY, - Domain.State.DNS_NEEDED, - Domain.State.ON_HOLD, - ], - } - - # Call the export function - export_domains_to_writer(writer, columns, sort_fields, filter_condition) - - # Reset the CSV file's position to the beginning - csv_file.seek(0) - - # Read the content into a variable - csv_content = csv_file.read() - - # We expect READY domains, - # sorted alphabetially by domain name - expected_content = ( - "Domain name,Domain type,Agency,Organization name,City,State,AO," - "AO email,Submitter,Submitter title,Submitter email,Submitter phone," - "Security Contact Email,Status\n" - "adomain2.gov,Interstate,dnsneeded\n" - "cdomain1.gov,Federal - Executive,World War I Centennial Commission,ready\n" - "ddomain3.gov,Federal,Armed Forces Retirement Home,onhold\n" - ) - - # Normalize line endings and remove commas, - # spaces and leading/trailing whitespace - csv_content = ( - csv_content.replace(",,", "") - .replace(",", "") - .replace(" ", "") - .replace("\r\n", "\n") - .strip() - ) - expected_content = ( - expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip() - ) - - self.assertEqual(csv_content, expected_content) - - def test_export_domains_to_writer_additional(self): - """An additional test for filters and multi-column sort""" - # Create a CSV file in memory - csv_file = StringIO() - writer = csv.writer(csv_file) - - # Define columns, sort fields, and filter condition - columns = [ - "Domain name", - "Domain type", - "Agency", - "Organization name", - "City", - "State", - "Security Contact Email", - ] - sort_fields = ["domain__name", "federal_agency", "organization_type"] - filter_condition = { - "organization_type__icontains": "federal", - "domain__state__in": [ - Domain.State.READY, - Domain.State.DNS_NEEDED, - Domain.State.ON_HOLD, - ], - } - - # Call the export function - export_domains_to_writer(writer, columns, sort_fields, filter_condition) - - # Reset the CSV file's position to the beginning - csv_file.seek(0) - - # Read the content into a variable - csv_content = csv_file.read() - - # We expect READY domains, - # federal only - # sorted alphabetially by domain name - expected_content = ( - "Domain name,Domain type,Agency,Organization name,City," - "State,Security Contact Email\n" - "cdomain1.gov,Federal - Executive,World War I Centennial Commission\n" - "ddomain3.gov,Federal,Armed Forces Retirement Home\n" - ) - - # Normalize line endings and remove commas, - # spaces and leading/trailing whitespace - csv_content = ( - csv_content.replace(",,", "") - .replace(",", "") - .replace(" ", "") - .replace("\r\n", "\n") - .strip() - ) - expected_content = ( - expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip() - ) - - self.assertEqual(csv_content, expected_content) diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index 92fd5af44..95af4c542 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -1170,7 +1170,6 @@ class TestWithDomainPermissions(TestWithUser): if hasattr(self.domain, "contacts"): self.domain.contacts.all().delete() DomainApplication.objects.all().delete() - DomainInformation.objects.all().delete() PublicContact.objects.all().delete() Domain.objects.all().delete() UserDomainRole.objects.all().delete() @@ -1465,12 +1464,7 @@ class TestDomainNameservers(TestDomainOverview): # form submission was a post with an error, response should be a 200 # error text appears twice, once at the top of the page, once around # the required field. form requires a minimum of 2 name servers - self.assertContains( - result, - "A minimum of 2 name servers are required.", - count=2, - status_code=200, - ) + self.assertContains(result, "This field is required.", count=2, status_code=200) def test_domain_nameservers_form_submit_subdomain_missing_ip(self): """Nameserver form catches missing ip error on subdomain. @@ -1638,12 +1632,7 @@ class TestDomainNameservers(TestDomainOverview): # form submission was a post with an error, response should be a 200 # error text appears four times, twice at the top of the page, # once around each required field. - self.assertContains( - result, - "A minimum of 2 name servers are required.", - count=4, - status_code=200, - ) + self.assertContains(result, "This field is required", count=4, status_code=200) class TestDomainAuthorizingOfficial(TestDomainOverview): @@ -1811,11 +1800,7 @@ class TestDomainSecurityEmail(TestDomainOverview): ( "RegistryError", form_data_registry_error, - """ -We’re experiencing a system connection error. Please wait a few minutes -and try again. If you continue to receive this error after a few tries, -contact help@get.gov - """, + "Update failed. Cannot contact the registry.", ), ("ContactError", form_data_contact_error, "Value entered was wrong."), ( @@ -1850,7 +1835,7 @@ contact help@get.gov self.assertEqual(len(messages), 1) message = messages[0] self.assertEqual(message.tags, message_tag) - self.assertEqual(message.message.strip(), expected_message.strip()) + self.assertEqual(message.message, expected_message) def test_domain_overview_blocked_for_ineligible_user(self): """We could easily duplicate this test for all domain management diff --git a/src/registrar/utility/csv_export.py b/src/registrar/utility/csv_export.py deleted file mode 100644 index ffada0a0b..000000000 --- a/src/registrar/utility/csv_export.py +++ /dev/null @@ -1,119 +0,0 @@ -import csv -from registrar.models.domain import Domain -from registrar.models.domain_information import DomainInformation -from registrar.models.public_contact import PublicContact - - -def export_domains_to_writer(writer, columns, sort_fields, filter_condition): - # write columns headers to writer - writer.writerow(columns) - - domainInfos = DomainInformation.objects.filter(**filter_condition).order_by( - *sort_fields - ) - for domainInfo in domainInfos: - security_contacts = domainInfo.domain.contacts.filter( - contact_type=PublicContact.ContactTypeChoices.SECURITY - ) - - # create a dictionary of fields which can be included in output - FIELDS = { - "Domain name": domainInfo.domain.name, - "Domain type": domainInfo.get_organization_type_display() - + " - " - + domainInfo.get_federal_type_display() - if domainInfo.federal_type - else domainInfo.get_organization_type_display(), - "Agency": domainInfo.federal_agency, - "Organization name": domainInfo.organization_name, - "City": domainInfo.city, - "State": domainInfo.state_territory, - "AO": domainInfo.authorizing_official.first_name - + " " - + domainInfo.authorizing_official.last_name - if domainInfo.authorizing_official - else " ", - "AO email": domainInfo.authorizing_official.email - if domainInfo.authorizing_official - else " ", - "Security Contact Email": security_contacts[0].email - if security_contacts - else " ", - "Status": domainInfo.domain.state, - "Expiration Date": domainInfo.domain.expiration_date, - } - writer.writerow([FIELDS.get(column, "") for column in columns]) - - -def export_data_type_to_csv(csv_file): - writer = csv.writer(csv_file) - # define columns to include in export - columns = [ - "Domain name", - "Domain type", - "Agency", - "Organization name", - "City", - "State", - "AO", - "AO email", - "Security Contact Email", - "Status", - "Expiration Date", - ] - sort_fields = ["domain__name"] - filter_condition = { - "domain__state__in": [ - Domain.State.READY, - Domain.State.DNS_NEEDED, - Domain.State.ON_HOLD, - ], - } - export_domains_to_writer(writer, columns, sort_fields, filter_condition) - - -def export_data_full_to_csv(csv_file): - writer = csv.writer(csv_file) - # define columns to include in export - columns = [ - "Domain name", - "Domain type", - "Agency", - "Organization name", - "City", - "State", - "Security Contact Email", - ] - sort_fields = ["domain__name", "federal_agency", "organization_type"] - filter_condition = { - "domain__state__in": [ - Domain.State.READY, - Domain.State.DNS_NEEDED, - Domain.State.ON_HOLD, - ], - } - export_domains_to_writer(writer, columns, sort_fields, filter_condition) - - -def export_data_federal_to_csv(csv_file): - writer = csv.writer(csv_file) - # define columns to include in export - columns = [ - "Domain name", - "Domain type", - "Agency", - "Organization name", - "City", - "State", - "Security Contact Email", - ] - sort_fields = ["domain__name", "federal_agency", "organization_type"] - filter_condition = { - "organization_type__icontains": "federal", - "domain__state__in": [ - Domain.State.READY, - Domain.State.DNS_NEEDED, - Domain.State.ON_HOLD, - ], - } - export_domains_to_writer(writer, columns, sort_fields, filter_condition) diff --git a/src/registrar/utility/errors.py b/src/registrar/utility/errors.py index 5d62953ac..c1d3c5849 100644 --- a/src/registrar/utility/errors.py +++ b/src/registrar/utility/errors.py @@ -39,11 +39,9 @@ class GenericError(Exception): """ _error_mapping = { - GenericErrorCodes.CANNOT_CONTACT_REGISTRY: """ -We’re experiencing a system connection error. Please wait a few minutes -and try again. If you continue to receive this error after a few tries, -contact help@get.gov - """, + GenericErrorCodes.CANNOT_CONTACT_REGISTRY: ( + "Update failed. Cannot contact the registry." + ), GenericErrorCodes.GENERIC_ERROR: ("Value entered was wrong."), } From a04ccc159b8e02bd69c72aae40611b1475dd24cf Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Wed, 1 Nov 2023 17:28:16 -0700 Subject: [PATCH 086/129] Updated footer.html to have all links open in new tab --- src/registrar/templates/includes/footer.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/registrar/templates/includes/footer.html b/src/registrar/templates/includes/footer.html index 29a14c37c..47d4836f1 100644 --- a/src/registrar/templates/includes/footer.html +++ b/src/registrar/templates/includes/footer.html @@ -47,7 +47,7 @@ >
                          @@ -74,35 +74,35 @@
                          From 4119d24149afeef8c10781a744e416096c12eaac Mon Sep 17 00:00:00 2001 From: Alysia Broddrick Date: Thu, 2 Nov 2023 19:24:47 -0700 Subject: [PATCH 087/129] added documentation and ADR for release schedule --- .../0024-production-release-cadence.md | 28 +++++++++++++++++++ docs/operations/README.md | 6 ++++ 2 files changed, 34 insertions(+) create mode 100644 docs/architecture/decisions/0024-production-release-cadence.md diff --git a/docs/architecture/decisions/0024-production-release-cadence.md b/docs/architecture/decisions/0024-production-release-cadence.md new file mode 100644 index 000000000..7b5383068 --- /dev/null +++ b/docs/architecture/decisions/0024-production-release-cadence.md @@ -0,0 +1,28 @@ +# 19. Role-based Access Control + +Date: 2023-11-02 + +## Status + +In Review + +## Context + +Going into our first production launch we need a plan describing what our release cadence for both our staging and stable envirornment will be. Currently, we release to staging whenever there are significant changes made, but we have not been making releases to stable with the same frequency. When deciding what our release schedule would be, we discussed releasing to stable once a sprint compared to releasing once a week. + +## Considered Options + +**Option 1:** Releasing to stable/staging once a sprint +Releasing once a sprint would mean that we release the past sprint's work to stable at the end of the current sprint. At the same point, the current sprint's work would be pushed to staging; thus making staging a full sprint ahead of stable. While this is more straight forward, it means our users would have to wait longer to see changes that weren't deemed critical. +**Option 2:** Releasing to stable/staging once a week +Releasing once a week would follow the same flow but with code being released to staging one week before the same code is released to stable. This would make staging only one week behind stable and would allow us to roll out minor bug fixes and faster with greater speed. The negative side is that we have less time to see if errors occur on staging + +In both of the above scenarios the release date would fall on the same day of the week that the sprint starts, which is currently a wednesday. Additionally, in both scenarios the release commits would eventually be tagged with both a staging and stable tag. Further, critical bugs or features would be exempt from these restrictions based on CISA's discretion. + +## Decision + +We decided to go with option 2 and release once a week once in production. This will allow us to give users features and bug fixes faster while still allowing enough time on staging for quality to be maintained. + +## Consequences + +Work not completed by end of the sprint will have to wait to be added to stable. \ No newline at end of file diff --git a/docs/operations/README.md b/docs/operations/README.md index 4de866cf5..176050ccc 100644 --- a/docs/operations/README.md +++ b/docs/operations/README.md @@ -43,6 +43,12 @@ For ease of use, you can run the `deploy.sh ` script in the `/src` Your sandbox space should've been setup as part of the onboarding process. If this was not the case, please have an admin follow the instructions [here](../../.github/ISSUE_TEMPLATE/developer-onboarding.md#setting-up-developer-sandbox). +## Rules for making Stable and Staging Releases + +Releases will be made for staging and stable every week starting on the first day of the sprint (Wednesday), with the second release of the sprint occuring halfway through the sprint. With the excpetion of the first time going into production (see below), these releases will NOT have the same code. The release to stable will be the same commit that was tagged for staging one week prior, making stable one week behind staging. Further, this means staging can be up to a week behind the main branch of code. + +If a bug fix needs to be made to stable, the code fix branch will need to be branched NOT off of main, but of of the same commit as the most recent stable commit. Then, after PR review, the code will be merged to main and a new release must be made to stable. + ## Serving static assets We are using [WhiteNoise](http://whitenoise.evans.io/en/stable/index.html) plugin to serve our static assets on cloud.gov. This plugin is added to the `MIDDLEWARE` list in our apps `settings.py`. From 79e0480058a915fe38c14e4ba693ee8684000de6 Mon Sep 17 00:00:00 2001 From: Alysia Broddrick Date: Thu, 2 Nov 2023 20:23:31 -0700 Subject: [PATCH 088/129] updated with consequences etc --- .../decisions/0024-production-release-cadence.md | 12 +++++++----- docs/operations/README.md | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/architecture/decisions/0024-production-release-cadence.md b/docs/architecture/decisions/0024-production-release-cadence.md index 7b5383068..402945149 100644 --- a/docs/architecture/decisions/0024-production-release-cadence.md +++ b/docs/architecture/decisions/0024-production-release-cadence.md @@ -8,16 +8,16 @@ In Review ## Context -Going into our first production launch we need a plan describing what our release cadence for both our staging and stable envirornment will be. Currently, we release to staging whenever there are significant changes made, but we have not been making releases to stable with the same frequency. When deciding what our release schedule would be, we discussed releasing to stable once a sprint compared to releasing once a week. +Going into our first production launch we need a plan describing what our release cadence for both our staging and stable envirornments will be. Currently, we release to staging whenever there are significant changes made, but we have not been making releases to stable with the same frequency. ## Considered Options **Option 1:** Releasing to stable/staging once a sprint -Releasing once a sprint would mean that we release the past sprint's work to stable at the end of the current sprint. At the same point, the current sprint's work would be pushed to staging; thus making staging a full sprint ahead of stable. While this is more straight forward, it means our users would have to wait longer to see changes that weren't deemed critical. +Releasing once a sprint would mean that we release the past sprint's work to stable at the end of the current sprint. At the same point, the current sprint's work would be pushed to staging, thus making staging a full sprint ahead of stable. While this is more straight forward, it means our users would have to wait longer to see changes that weren't deemed critical. **Option 2:** Releasing to stable/staging once a week -Releasing once a week would follow the same flow but with code being released to staging one week before the same code is released to stable. This would make staging only one week behind stable and would allow us to roll out minor bug fixes and faster with greater speed. The negative side is that we have less time to see if errors occur on staging +Releasing once a week would follow the same flow but with code being released to staging one week before the same code is released to stable. This would make stable only one week behind staging and would allow us to roll out minor bug fixes and faster with greater speed. The negative side is that we have less time to see if errors occur on staging -In both of the above scenarios the release date would fall on the same day of the week that the sprint starts, which is currently a wednesday. Additionally, in both scenarios the release commits would eventually be tagged with both a staging and stable tag. Further, critical bugs or features would be exempt from these restrictions based on CISA's discretion. +In both of the above scenarios the release date would fall on the same day of the week that the sprint starts, which is currently a Wednesday. Additionally, in both scenarios the release commits would eventually be tagged with both a staging and stable tag. Furthermore, critical bugs or features would be exempt from these restrictions based on CISA's discretion. ## Decision @@ -25,4 +25,6 @@ We decided to go with option 2 and release once a week once in production. This ## Consequences -Work not completed by end of the sprint will have to wait to be added to stable. \ No newline at end of file +Work not completed by end of the sprint will have to wait to be added to stable. Also, making hit fixes for bugs that are found on stable will be a little more complicated to fix. + +When first going into production, staging and stable will start with the same code base. The following week a new release will be made to staging, but not stable as no code will have been on staging long enough to warrant another release. Thus just at the start of launch stable will be essentially frozen for 2 weeks, not one. diff --git a/docs/operations/README.md b/docs/operations/README.md index 176050ccc..7944f5866 100644 --- a/docs/operations/README.md +++ b/docs/operations/README.md @@ -43,11 +43,11 @@ For ease of use, you can run the `deploy.sh ` script in the `/src` Your sandbox space should've been setup as part of the onboarding process. If this was not the case, please have an admin follow the instructions [here](../../.github/ISSUE_TEMPLATE/developer-onboarding.md#setting-up-developer-sandbox). -## Rules for making Stable and Staging Releases +## Stable and Staging Release Rules -Releases will be made for staging and stable every week starting on the first day of the sprint (Wednesday), with the second release of the sprint occuring halfway through the sprint. With the excpetion of the first time going into production (see below), these releases will NOT have the same code. The release to stable will be the same commit that was tagged for staging one week prior, making stable one week behind staging. Further, this means staging can be up to a week behind the main branch of code. +Releases will be made for staging and stable every week starting on the first day of the sprint (Wednesday), with the second release of the sprint occuring halfway through the sprint. With the exception of first time going into production, these releases will NOT have the same code. The release to stable will be the same commit that was tagged for staging one week prior, making stable one week behind staging. Further, this means staging can be up to a week behind the main branch of code. -If a bug fix needs to be made to stable, the code fix branch will need to be branched NOT off of main, but of of the same commit as the most recent stable commit. Then, after PR review, the code will be merged to main and a new release must be made to stable. +If a bug fix or feature needs to be made to stable out of the normal cycle, this can only be done at CISA's request. In this case, the code fix branch will need to be branched NOT off of main, but off of the same commit as the most recent stable commit. Then, after PR review, the code will be merged to main and a new release must be made to stable. This bug fix or feature must be added to staging immediately as well. ## Serving static assets We are using [WhiteNoise](http://whitenoise.evans.io/en/stable/index.html) plugin to serve our static assets on cloud.gov. This plugin is added to the `MIDDLEWARE` list in our apps `settings.py`. From 9725788a8bdd1e7657487c1c0e5fc69d7bff485e Mon Sep 17 00:00:00 2001 From: Alysia Broddrick Date: Thu, 2 Nov 2023 20:24:10 -0700 Subject: [PATCH 089/129] updated adr number --- docs/architecture/decisions/0024-production-release-cadence.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture/decisions/0024-production-release-cadence.md b/docs/architecture/decisions/0024-production-release-cadence.md index 402945149..62b23eefb 100644 --- a/docs/architecture/decisions/0024-production-release-cadence.md +++ b/docs/architecture/decisions/0024-production-release-cadence.md @@ -1,4 +1,4 @@ -# 19. Role-based Access Control +# 24. Role-based Access Control Date: 2023-11-02 From 70faa6beb96031cc63ecf66ca5c313e3621ecdbe Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Fri, 3 Nov 2023 10:16:10 -0400 Subject: [PATCH 090/129] fix 500 error message when managing domain w/o information and application --- src/registrar/views/utility/mixins.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/registrar/views/utility/mixins.py b/src/registrar/views/utility/mixins.py index 97db65505..5389e3257 100644 --- a/src/registrar/views/utility/mixins.py +++ b/src/registrar/views/utility/mixins.py @@ -100,7 +100,15 @@ class DomainPermission(PermissionsLoginMixin): if DomainInformation.objects.filter(id=pk).exists(): requested_domain = DomainInformation.objects.get(id=pk) - if requested_domain.domain_application.status not in valid_domain_statuses: + # if no domain information or domain application exist, the user + # should be able to manage the domain; however, if domain information + # and domain application exist, and application is not in valid status, + # user should not be able to manage domain + if ( + requested_domain + and requested_domain.domain_application + and requested_domain.domain_application.status not in valid_domain_statuses + ): return False # Valid session keys exist, From 6e34d231f30d50ea57cd355ae5c910a598238a72 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Fri, 3 Nov 2023 09:37:10 -0600 Subject: [PATCH 091/129] Add global setting --- ops/manifests/manifest-za.yaml | 3 +++ src/registrar/config/settings.py | 3 +++ src/registrar/templates/home.html | 8 +++++++- src/registrar/views/index.py | 3 ++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ops/manifests/manifest-za.yaml b/ops/manifests/manifest-za.yaml index 23b6179ec..774ed57ec 100644 --- a/ops/manifests/manifest-za.yaml +++ b/ops/manifests/manifest-za.yaml @@ -23,6 +23,9 @@ applications: DJANGO_LOG_LEVEL: INFO # default public site location GETGOV_PUBLIC_SITE_URL: https://beta.get.gov + # NOTE: This needs to go in manifest-staging + # This is here for PR purposes only! + IS_PRODUCTION: True routes: - route: getgov-za.app.cloud.gov services: diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py index 3e5734dcc..99c0add33 100644 --- a/src/registrar/config/settings.py +++ b/src/registrar/config/settings.py @@ -46,6 +46,7 @@ path = Path(__file__) env_db_url = env.dj_db_url("DATABASE_URL") env_debug = env.bool("DJANGO_DEBUG", default=False) +env_is_production = env.bool("IS_PRODUCTION", default=False) env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG") env_base_url = env.str("DJANGO_BASE_URL") env_getgov_public_site_url = env.str("GETGOV_PUBLIC_SITE_URL", "") @@ -72,6 +73,8 @@ BASE_DIR = path.resolve().parent.parent.parent # SECURITY WARNING: don't run with debug turned on in production! DEBUG = env_debug +# Controls production specific feature toggles +IS_PRODUCTION = env_is_production # Applications are modular pieces of code. # They are provided by Django, by third-parties, or by yourself. diff --git a/src/registrar/templates/home.html b/src/registrar/templates/home.html index 730430ffd..ff487dc06 100644 --- a/src/registrar/templates/home.html +++ b/src/registrar/templates/home.html @@ -13,6 +13,7 @@

                          Manage your domains

                          + {% if is_production %} Start a new domain request + {% else %} + + Start a new domain request + + {% endif %}

                          @@ -134,7 +140,7 @@ {% endif %}
                          - {# Note: Reimplement this after MVP.. #} + {# Note: Reimplement this after MVP #}