Date: Mon, 23 Jan 2023 17:46:48 -0500
Subject: [PATCH 5/9] Move all AO text into one file
---
.../application_authorizing_official.html | 24 +--------
.../templates/includes/ao_example.html | 49 +++++++++++++++++++
2 files changed, 50 insertions(+), 23 deletions(-)
create mode 100644 src/registrar/templates/includes/ao_example.html
diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html
index f5c18b2ce..d83a59893 100644
--- a/src/registrar/templates/application_authorizing_official.html
+++ b/src/registrar/templates/application_authorizing_official.html
@@ -13,29 +13,7 @@
- {% if is_federal %}
- {% if federal_type == 'executive' %}
- {% include "includes/ao_example__exec.html" %}
- {% elif federal_type == 'judicial' %}
- {% include "includes/ao_example__judicial.html" %}
- {% elif federal_type == 'legislative' %}
- {% include "includes/ao_example__legislative.html" %}
- {% endif %}
- {% elif organization_type == 'city' %}
- {% include "includes/ao_example__city.html" %}
- {% elif organization_type == 'county' %}
- {% include "includes/ao_example__county.html" %}
- {% elif organization_type == 'interstate' %}
- {% include "includes/ao_example__interstate.html" %}
- {% elif organization_type == 'school_district' %}
- {% include "includes/ao_example__school-district.html" %}
- {% elif organization_type == 'special_district' %}
- {% include "includes/ao_example__special-district.html" %}
- {% elif organization_type == 'state_or_territory' %}
- {% include "includes/ao_example__state-territory.html" %}
- {% elif organization_type == 'tribal' %}
- {% include "includes/ao_example__tribal.html" %}
- {% endif %}
+ {% include "includes/ao_example.html" %}
We’ll contact your authorizing official to let them know that you made this request and to double check that they approve it.
diff --git a/src/registrar/templates/includes/ao_example.html b/src/registrar/templates/includes/ao_example.html
new file mode 100644
index 000000000..f51752a38
--- /dev/null
+++ b/src/registrar/templates/includes/ao_example.html
@@ -0,0 +1,49 @@
+{% if is_federal %}
+ {% if federal_type == 'executive' %}
+ Domain requests from executive branch agencies must be authorized by Chief Information Officers or agency heads.
+ Domain requests from executive branch agencies are subject to guidance issued by the U.S. Office of Management and Budget.
+
+ {% elif federal_type == 'judicial' %}
+ Domain requests from the U.S. Supreme Court must be authorized by the director of information technology for the U.S. Supreme Court.
+ Domain requests from other judicial branch agencies must be authorized by the director or Chief Information Officer of the Administrative Office (AO) of the United States Courts.
+
+
+ {% elif federal_type == 'legislative' %}
+ U.S. Senate
+ Domain requests from the U.S. Senate must come from the Senate Sergeant at Arms.
+
+ U.S. House of Representatives
+ Domain requests from the U.S. House of Representatives must come from the House Chief Administrative Officer.
+
+
Other legislative branch agencies
+ Domain requests from legislative branch agencies must come from the agency’s head or Chief Information Officer.
+ Domain requests from legislative commissions must come from the head of the commission, or the head or Chief Information Officer of the parent agency, if there is one.
+
+
+ {% endif %}
+
+{% elif organization_type == 'city' %}
+ Domain requests from cities must be authorized by the mayor or the equivalent highest elected official.
+
+{% elif organization_type == 'county' %}
+ Domain requests from counties must be authorized by the chair of the county commission or the equivalent highest elected official.
+
+{% elif organization_type == 'interstate' %}
+ Domain requests from interstate organizations must be authorized by the highest-ranking executive (president, director, chair, or equivalent) or one of the state’s governors or Chief Information Officers.
+
+{% elif organization_type == 'school_district' %}
+ Domain requests from school district governments must be authorized by the highest-ranking executive (the chair of a school district’s board or a superintendent).
+
+{% elif organization_type == 'special_district' %}
+ Domain requests from special districts must be authorized by the highest-ranking executive (president, director, chair, or equivalent) or state Chief Information Officers for state-based organizations.
+
+{% elif organization_type == 'state_or_territory' %}
+ States and territories: executive branch
+ Domain requests from states and territories must be authorized by the governor or the state Chief Information Officer.
+ States and territories: judicial and legislative branches
+ 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 tribal chiefs as noted by the Bureau of Indian Affairs.
+
+{% endif %}
From c0a0ae41e06a243a4b91a708f3415d239f11010e Mon Sep 17 00:00:00 2001
From: igorkorenfeld
Date: Mon, 23 Jan 2023 17:50:06 -0500
Subject: [PATCH 6/9] Remove indivdiual example files for ao
---
src/registrar/templates/includes/ao_example__city.html | 1 -
.../templates/includes/ao_example__county.html | 2 --
src/registrar/templates/includes/ao_example__exec.html | 3 ---
.../templates/includes/ao_example__interstate.html | 2 --
.../templates/includes/ao_example__judicial.html | 4 ----
.../templates/includes/ao_example__legislative.html | 10 ----------
.../includes/ao_example__school-district.html | 3 ---
.../includes/ao_example__special-district.html | 2 --
.../includes/ao_example__state-territory.html | 4 ----
.../templates/includes/ao_example__tribal.html | 2 --
10 files changed, 33 deletions(-)
delete mode 100644 src/registrar/templates/includes/ao_example__city.html
delete mode 100644 src/registrar/templates/includes/ao_example__county.html
delete mode 100644 src/registrar/templates/includes/ao_example__exec.html
delete mode 100644 src/registrar/templates/includes/ao_example__interstate.html
delete mode 100644 src/registrar/templates/includes/ao_example__judicial.html
delete mode 100644 src/registrar/templates/includes/ao_example__legislative.html
delete mode 100644 src/registrar/templates/includes/ao_example__school-district.html
delete mode 100644 src/registrar/templates/includes/ao_example__special-district.html
delete mode 100644 src/registrar/templates/includes/ao_example__state-territory.html
delete mode 100644 src/registrar/templates/includes/ao_example__tribal.html
diff --git a/src/registrar/templates/includes/ao_example__city.html b/src/registrar/templates/includes/ao_example__city.html
deleted file mode 100644
index 6da683e23..000000000
--- a/src/registrar/templates/includes/ao_example__city.html
+++ /dev/null
@@ -1 +0,0 @@
-Domain requests from cities must be authorized by the mayor or the equivalent highest elected official.
diff --git a/src/registrar/templates/includes/ao_example__county.html b/src/registrar/templates/includes/ao_example__county.html
deleted file mode 100644
index 8f37a3419..000000000
--- a/src/registrar/templates/includes/ao_example__county.html
+++ /dev/null
@@ -1,2 +0,0 @@
-Domain requests from counties must be authorized by the chair of the county commission or the equivalent highest elected official.
-
diff --git a/src/registrar/templates/includes/ao_example__exec.html b/src/registrar/templates/includes/ao_example__exec.html
deleted file mode 100644
index 8be0843c8..000000000
--- a/src/registrar/templates/includes/ao_example__exec.html
+++ /dev/null
@@ -1,3 +0,0 @@
-Domain requests from executive branch agencies must be authorized by Chief Information Officers or agency heads.
-Domain requests from executive branch agencies are subject to guidance issued by the U.S. Office of Management and Budget.
-
diff --git a/src/registrar/templates/includes/ao_example__interstate.html b/src/registrar/templates/includes/ao_example__interstate.html
deleted file mode 100644
index f3c05e62a..000000000
--- a/src/registrar/templates/includes/ao_example__interstate.html
+++ /dev/null
@@ -1,2 +0,0 @@
-Domain requests from interstate organizations must be authorized by the highest-ranking executive (president, director, chair, or equivalent) or one of the state’s governors or Chief Information Officers.
-
diff --git a/src/registrar/templates/includes/ao_example__judicial.html b/src/registrar/templates/includes/ao_example__judicial.html
deleted file mode 100644
index 773f13cb6..000000000
--- a/src/registrar/templates/includes/ao_example__judicial.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Domain requests from the U.S. Supreme Court must be authorized by the director of information technology for the U.S. Supreme Court.
-Domain requests from other judicial branch agencies must be authorized by the director or Chief Information Officer of the Administrative Office (AO) of the United States Courts.
-
-
diff --git a/src/registrar/templates/includes/ao_example__legislative.html b/src/registrar/templates/includes/ao_example__legislative.html
deleted file mode 100644
index f0398c101..000000000
--- a/src/registrar/templates/includes/ao_example__legislative.html
+++ /dev/null
@@ -1,10 +0,0 @@
- U.S. Senate
-Domain requests from the U.S. Senate must come from the Senate Sergeant at Arms.
-
- U.S. House of Representatives
-Domain requests from the U.S. House of Representatives must come from the House Chief Administrative Officer.
-
-
Other legislative branch agencies
-Domain requests from legislative branch agencies must come from the agency’s head or Chief Information Officer.
-Domain requests from legislative commissions must come from the head of the commission, or the head or Chief Information Officer of the parent agency, if there is one.
-
diff --git a/src/registrar/templates/includes/ao_example__school-district.html b/src/registrar/templates/includes/ao_example__school-district.html
deleted file mode 100644
index 142e433af..000000000
--- a/src/registrar/templates/includes/ao_example__school-district.html
+++ /dev/null
@@ -1,3 +0,0 @@
-Domain requests from school district governments must be authorized by the highest-ranking executive (the chair of a school district’s board or a superintendent).
-
-
diff --git a/src/registrar/templates/includes/ao_example__special-district.html b/src/registrar/templates/includes/ao_example__special-district.html
deleted file mode 100644
index eb4b48d9c..000000000
--- a/src/registrar/templates/includes/ao_example__special-district.html
+++ /dev/null
@@ -1,2 +0,0 @@
-Domain requests from special districts must be authorized by the highest-ranking executive (president, director, chair, or equivalent) or state Chief Information Officers for state-based organizations.
-
diff --git a/src/registrar/templates/includes/ao_example__state-territory.html b/src/registrar/templates/includes/ao_example__state-territory.html
deleted file mode 100644
index f08a59f5f..000000000
--- a/src/registrar/templates/includes/ao_example__state-territory.html
+++ /dev/null
@@ -1,4 +0,0 @@
-States and territories: executive branch
-Domain requests from states and territories must be authorized by the governor or the state Chief Information Officer.
-States and territories: judicial and legislative branches
-Domain requests from state legislatures and courts must be authorized by an agency’s Chief Information Officer or highest-ranking executive.
diff --git a/src/registrar/templates/includes/ao_example__tribal.html b/src/registrar/templates/includes/ao_example__tribal.html
deleted file mode 100644
index 8184d4822..000000000
--- a/src/registrar/templates/includes/ao_example__tribal.html
+++ /dev/null
@@ -1,2 +0,0 @@
-Domain requests from federally-recognized tribal governments must be authorized by tribal chiefs as noted by the Bureau of Indian Affairs.
-
From 04e7eba98308df8afa081584a64843fffe55d63a Mon Sep 17 00:00:00 2001
From: igorkorenfeld
Date: Mon, 23 Jan 2023 17:52:45 -0500
Subject: [PATCH 7/9] Fix linter issue
---
src/registrar/tests/test_views.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index 32973d0cf..fb71b3ab0 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -881,7 +881,6 @@ class DomainApplicationTests(TestWithUser, WebTest):
# ---- DOTGOV DOMAIN PAGE ----
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
dotgov_page = current_sites_result.follow()
- dotgov_form = dotgov_page.form
self.assertContains(dotgov_page, "medicare.gov")
@@ -900,7 +899,6 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.assertContains(dotgov_page, "BlufftonIndiana.gov")
self.assertNotContains(dotgov_page, "medicare.gov")
-
@skip("WIP")
def test_application_edit_restore(self):
"""
From 0337bbc5362667a883a2b5e6a14d1a7e23933465 Mon Sep 17 00:00:00 2001
From: igorkorenfeld
Date: Tue, 24 Jan 2023 12:35:16 -0500
Subject: [PATCH 8/9] Update AO example for tribal orgs to match latest
---
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 f51752a38..4d6b5a301 100644
--- a/src/registrar/templates/includes/ao_example.html
+++ b/src/registrar/templates/includes/ao_example.html
@@ -44,6 +44,6 @@
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 tribal chiefs as noted 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 as noted by the Bureau of Indian Affairs.
{% endif %}
From 7b5824243393cc707a9f6f747126f8caf71b8b40 Mon Sep 17 00:00:00 2001
From: igorkorenfeld
Date: Wed, 25 Jan 2023 12:44:31 -0500
Subject: [PATCH 9/9] Fix failing tests after merge
---
src/registrar/tests/test_views.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index 5fe99c8a5..cbcaa9aec 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -872,7 +872,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
current_sites_page = ao_result.follow()
current_sites_form = current_sites_page.form
- current_sites_form["current_sites-current_site"] = "www.city.com"
+ current_sites_form["current_sites-0-website"] = "www.city.com"
# test saving the page
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
@@ -902,6 +902,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
def test_application_formsets(self):
"""Users are able to add more than one of some fields."""
current_sites_page = self.app.get(reverse("application:current_sites"))
+ session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
# fill in the form field
current_sites_form = current_sites_page.form
self.assertIn("current_sites-0-website", current_sites_form.fields)