From 28a80ace3684890a61b322af31db1b345ca13885 Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Mon, 4 Sep 2023 11:34:46 -0700
Subject: [PATCH 01/16] Reverting back to step 1 where we are just changing the
information within the form
---
src/registrar/forms/application_wizard.py | 32 +++++--------------
.../templates/application_type_of_work.html | 18 ++++++++++-
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index 578a501d3..e118a9856 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -311,27 +311,13 @@ class OrganizationContactForm(RegistrarForm):
class TypeOfWorkForm(RegistrarForm):
+ # TO DO:
+ # 1. Confirm it's required
+ # 2. Even if it is required, the label seems to be reading from somewhere and not hiding itself
+ # 3. Fix all emails to be - about your organization but we need to fix title somehow
type_of_work = forms.CharField(
- # label has to end in a space to get the label_suffix to show
- label="What type of work does your organization do? ",
- widget=forms.Textarea(),
- validators=[
- MaxLengthValidator(
- 1000,
- message="Response must be less than 1000 characters.",
- )
- ],
- error_messages={"required": "Enter the type of work your organization does."},
- )
-
- more_organization_information = forms.CharField(
- # label has to end in a space to get the label_suffix to show
- label=(
- "Describe how your organization is a government organization that is"
- " independent of a state government. Include links to authorizing"
- " legislation, applicable bylaws or charter, or other documentation to"
- " support your claims. "
- ),
+ required=False,
+ label="TypeOfWork",
widget=forms.Textarea(),
validators=[
MaxLengthValidator(
@@ -339,14 +325,12 @@ class TypeOfWorkForm(RegistrarForm):
message="Response must be less than 1000 characters.",
)
],
+ # Confirm if this error message wording is ok, prev was "Enter the type of work your organization does."
error_messages={
- "required": (
- "Describe how your organization is independent of a state government."
- )
+ "required": ("Enter information about your organization.")
},
)
-
class AuthorizingOfficialForm(RegistrarForm):
def to_database(self, obj):
if not self.is_valid():
diff --git a/src/registrar/templates/application_type_of_work.html b/src/registrar/templates/application_type_of_work.html
index 9ad58936f..5f947c8dc 100644
--- a/src/registrar/templates/application_type_of_work.html
+++ b/src/registrar/templates/application_type_of_work.html
@@ -2,9 +2,25 @@
{% load field_helpers %}
+{% block form_instructions %}
+ [For special districts, interstate governments]
+ We’d like to know more about your organization. Include the following in your response:
+
+
+ - The type of work your organization does
+ - How your organization is a government organization that is independent of a state government
+ - Include links to authorizing legislation, applicable bylaws or charter, or other documentation to support your claims.
+
+
+ * This question is required.
+{% endblock %}
+
+{% block form_required_fields_help_text %}
+{# empty this block so it doesn't show on this page #}
+{% endblock %}
+
{% block form_fields %}
{% with attr_maxlength=1000 %}
{% input_with_errors forms.0.type_of_work %}
- {% input_with_errors forms.0.more_organization_information %}
{% endwith %}
{% endblock %}
\ No newline at end of file
From a4adb5ed46323f048fcbbdc434730c9abac9bd7c Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Mon, 4 Sep 2023 12:07:57 -0700
Subject: [PATCH 02/16] Changes but with comments this time
---
src/registrar/admin.py | 2 ++
src/registrar/config/urls.py | 1 +
src/registrar/forms/application_wizard.py | 8 ++------
src/registrar/models/domain_application.py | 10 ++++++++++
src/registrar/models/domain_information.py | 9 +++++++++
src/registrar/templates/application_review.html | 1 +
src/registrar/templates/application_status.html | 7 +++++++
src/registrar/templates/application_type_of_work.html | 2 ++
src/registrar/tests/common.py | 4 +++-
src/registrar/tests/test_admin.py | 4 +++-
src/registrar/tests/test_emails.py | 2 ++
src/registrar/tests/test_forms.py | 3 +++
src/registrar/tests/test_views.py | 7 +++++++
src/registrar/views/application.py | 5 ++++-
14 files changed, 56 insertions(+), 9 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 4696a15bf..38a1c407e 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -233,6 +233,7 @@ class DomainApplicationAdmin(ListHeaderAdmin):
search_help_text = "Search by domain or submitter."
# Detail view
+ # TODO-446: Add "about_your_organization" + remove "type_of_work" and "more_organization_information"
fieldsets = [
(None, {"fields": ["status", "investigator", "creator"]}),
(
@@ -283,6 +284,7 @@ class DomainApplicationAdmin(ListHeaderAdmin):
]
# Read only that we'll leverage for CISA Analysts
+ # TODO-446: Add "about_your_organization" + remove "type_of_work" and "more_organization_information"
analyst_readonly_fields = [
"creator",
"type_of_work",
diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py
index 0f136c932..078fe4ed3 100644
--- a/src/registrar/config/urls.py
+++ b/src/registrar/config/urls.py
@@ -19,6 +19,7 @@ application_urls = [
path("finished/", views.Finished.as_view(), name="finished"),
]
+# TODO-446: (Step.ABOUT_YOUR_ORGANIZATION, views.AboutYourOrganization),
# dynamically generate the other application_urls
for step, view in [
# add/remove steps here
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index e118a9856..22d39e8bb 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -309,12 +309,8 @@ class OrganizationContactForm(RegistrarForm):
)
return federal_agency
-
+# TODO-446: Update name of form + variable naming
class TypeOfWorkForm(RegistrarForm):
- # TO DO:
- # 1. Confirm it's required
- # 2. Even if it is required, the label seems to be reading from somewhere and not hiding itself
- # 3. Fix all emails to be - about your organization but we need to fix title somehow
type_of_work = forms.CharField(
required=False,
label="TypeOfWork",
@@ -325,7 +321,7 @@ class TypeOfWorkForm(RegistrarForm):
message="Response must be less than 1000 characters.",
)
],
- # Confirm if this error message wording is ok, prev was "Enter the type of work your organization does."
+ # TODO-446: Confirm if this error message wording is ok, prev was "Enter the type of work your organization does."
error_messages={
"required": ("Enter information about your organization.")
},
diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_application.py
index b1230b703..b8af01e6a 100644
--- a/src/registrar/models/domain_application.py
+++ b/src/registrar/models/domain_application.py
@@ -384,12 +384,21 @@ class DomainApplication(TimeStampedModel):
help_text="Type of work of the organization",
)
+ # TODO-446:
+ # about_your_organization = models.TextField(
+ # null=True,
+ # blank=True,
+ # help_text="Information about your organization",
+ # )
+
more_organization_information = models.TextField(
null=True,
blank=True,
help_text="More information about your organization",
)
+ # TODO-446: Remove above bc we don't need this textbox anymore
+
authorizing_official = models.ForeignKey(
"registrar.Contact",
null=True,
@@ -653,6 +662,7 @@ class DomainApplication(TimeStampedModel):
]
return bool(user_choice and user_choice not in excluded)
+ # TODO-446: Rename to show_about_your_organization
def show_type_of_work(self) -> bool:
"""Show this step if this is a special district or interstate."""
user_choice = self.organization_type
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index b12039e73..f5c62121b 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -140,11 +140,20 @@ class DomainInformation(TimeStampedModel):
help_text="Type of work of the organization",
)
+ # TODO-446:
+ # about_your_organization = models.TextField(
+ # null=True,
+ # blank=True,
+ # help_text="Information about your organization",
+ # )
+
more_organization_information = models.TextField(
null=True,
blank=True,
help_text="Further information about the government organization",
)
+
+ # TODO-446: Remove above bc we don't need this textbox anymore
authorizing_official = models.ForeignKey(
"registrar.Contact",
diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html
index b9ac97871..5f2e3e29a 100644
--- a/src/registrar/templates/application_review.html
+++ b/src/registrar/templates/application_review.html
@@ -46,6 +46,7 @@
Incomplete
{% endif %}
{% endif %}
+
{% if step == Step.TYPE_OF_WORK %}
{{ application.type_of_work|default:"Incomplete" }}
{{ application.more_organization_information|default:"Incomplete" }}
diff --git a/src/registrar/templates/application_status.html b/src/registrar/templates/application_status.html
index 2d59a32eb..c95b33ad6 100644
--- a/src/registrar/templates/application_status.html
+++ b/src/registrar/templates/application_status.html
@@ -68,6 +68,11 @@
{% include "includes/summary_item.html" with title='Organization name and mailing address' value=domainapplication address='true' heading_level=heading_level %}
{% endif %}
+
+
{% if domainapplication.type_of_work %}
{% include "includes/summary_item.html" with title='Type of work' value=domainapplication.type_of_work heading_level=heading_level %}
{% endif %}
@@ -75,6 +80,8 @@
{% if domainapplication.more_organization_information %}
{% include "includes/summary_item.html" with title='More information about your organization' value=domainapplication.more_organization_information heading_level=heading_level %}
{% endif %}
+
+
{% if domainapplication.authorizing_official %}
{% include "includes/summary_item.html" with title='Authorizing official' value=domainapplication.authorizing_official contact='true' heading_level=heading_level %}
diff --git a/src/registrar/templates/application_type_of_work.html b/src/registrar/templates/application_type_of_work.html
index 5f947c8dc..7bd02bf32 100644
--- a/src/registrar/templates/application_type_of_work.html
+++ b/src/registrar/templates/application_type_of_work.html
@@ -1,6 +1,7 @@
{% extends 'application_form.html' %}
{% load field_helpers %}
+
{% block form_instructions %}
[For special districts, interstate governments]
@@ -19,6 +20,7 @@
{# empty this block so it doesn't show on this page #}
{% endblock %}
+
{% block form_fields %}
{% with attr_maxlength=1000 %}
{% input_with_errors forms.0.type_of_work %}
diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py
index c4a2772b0..11e66df62 100644
--- a/src/registrar/tests/common.py
+++ b/src/registrar/tests/common.py
@@ -248,6 +248,7 @@ class AuditedAdminMockData:
creator: User = self.dummy_user(item_name, "creator"),
}
""" # noqa
+ # TODO-446: Update type_of_work to about_your_organization
common_args = dict(
organization_type=org_type,
federal_type=federal_type,
@@ -433,7 +434,7 @@ def create_user():
password=p,
)
-
+# TODO-446: Update has_type_of_work to has_about_your_organization
def completed_application(
has_other_contacts=True,
has_current_website=True,
@@ -486,6 +487,7 @@ def completed_application(
creator=user,
status=status,
)
+ # TODO-446: Update has_type_of_work to has_about_your_organization
if has_type_of_work:
domain_application_kwargs["type_of_work"] = "e-Government"
if has_anything_else:
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index fc5478dd9..44ca259fe 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -315,7 +315,8 @@ class TestDomainApplicationAdmin(TestCase):
request.user = self.superuser
readonly_fields = self.admin.get_readonly_fields(request, application)
-
+
+ # TODO-446: Add about_your_organization + remove type_of_work and more_organization_information
expected_fields = [
"id",
"created_at",
@@ -360,6 +361,7 @@ class TestDomainApplicationAdmin(TestCase):
readonly_fields = self.admin.get_readonly_fields(request)
+ # TODO-446: Add about_your_organization + remove type_of_work and more_organization_information
expected_fields = [
"creator",
"type_of_work",
diff --git a/src/registrar/tests/test_emails.py b/src/registrar/tests/test_emails.py
index b5c6cd428..178b3c473 100644
--- a/src/registrar/tests/test_emails.py
+++ b/src/registrar/tests/test_emails.py
@@ -125,6 +125,7 @@ class TestEmails(TestCase):
# spacing should be right between adjacent elements
self.assertRegex(body, r"city.gov\n\nPurpose of your domain:")
+ # TODO-446: Update type_of_work -> about_your_organization
@boto3_mocking.patching
def test_submission_confirmation_type_of_work_spacing(self):
"""Test line spacing with type of work."""
@@ -137,6 +138,7 @@ class TestEmails(TestCase):
# spacing should be right between adjacent elements
self.assertRegex(body, r"10002\n\nType of work:")
+ # TODO-446: Update type_of_work -> about_your_organization
@boto3_mocking.patching
def test_submission_confirmation_no_type_of_work_spacing(self):
"""Test line spacing without type of work."""
diff --git a/src/registrar/tests/test_forms.py b/src/registrar/tests/test_forms.py
index 173362943..7f84eb025 100644
--- a/src/registrar/tests/test_forms.py
+++ b/src/registrar/tests/test_forms.py
@@ -118,6 +118,7 @@ class TestFormValidation(TestCase):
["Response must be less than 1000 characters."],
)
+ # TODO-446: Update type_of_work -> about_your_organization
def test_anything_else_form_type_of_work_character_count_invalid(self):
"""Response must be less than 1000 characters."""
form = AnythingElseForm(
@@ -147,6 +148,7 @@ class TestFormValidation(TestCase):
["Response must be less than 1000 characters."],
)
+ # TODO-446: Can remove bc don't have this textbox anymore
def test_anything_else_form_more_organization_information_character_count_invalid(
self,
):
@@ -179,6 +181,7 @@ class TestFormValidation(TestCase):
["Response must be less than 1000 characters."],
)
+ # TODO-446: Update type_of_work -> about_your_organization in data and assertEqual
def test_anything_else_form_character_count_invalid(self):
"""Response must be less than 1000 characters."""
form = TypeOfWorkForm(
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index af01676b4..baea45b8b 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -664,7 +664,9 @@ class DomainApplicationTests(TestWithUser, WebTest):
# if it was successful.
self.assertEqual(contact_result.status_code, 302)
self.assertEqual(contact_result["Location"], "/register/type_of_work/")
+ # TODO-446: self.assertEqual(contact_result["Location"], "/register/about_your_organization/")
+ # TODO-446: Update type_of_work -> about_your_organization
def test_application_type_of_work_special(self):
"""Special districts have to answer an additional question."""
type_page = self.app.get(reverse("application:")).follow()
@@ -685,6 +687,8 @@ class DomainApplicationTests(TestWithUser, WebTest):
contact_page = type_result.follow()
self.assertContains(contact_page, self.TITLES[Step.TYPE_OF_WORK])
+ # TODO-446: self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
+
def test_application_no_other_contacts(self):
"""Applicants with no other contacts have to give a reason."""
@@ -704,6 +708,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
actual_url_slug = no_contacts_page.request.path.split("/")[-2]
self.assertEqual(expected_url_slug, actual_url_slug)
+ # TODO-446: Update type_of_work -> about_your_organization
def test_application_type_of_work_interstate(self):
"""Special districts have to answer an additional question."""
type_page = self.app.get(reverse("application:")).follow()
@@ -724,6 +729,8 @@ class DomainApplicationTests(TestWithUser, WebTest):
contact_page = type_result.follow()
self.assertContains(contact_page, self.TITLES[Step.TYPE_OF_WORK])
+ # TODO-446: self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
+
def test_application_tribal_government(self):
"""Tribal organizations have to answer an additional question."""
diff --git a/src/registrar/views/application.py b/src/registrar/views/application.py
index 23d7348e9..b3f3a8517 100644
--- a/src/registrar/views/application.py
+++ b/src/registrar/views/application.py
@@ -17,6 +17,7 @@ from .utility import DomainApplicationPermissionView, ApplicationWizardPermissio
logger = logging.getLogger(__name__)
+# TODO-446: ABOUT_YOUR_ORGANIZATION = "about_your_organization"
class Step(StrEnum):
"""
Names for each page of the application wizard.
@@ -71,6 +72,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
EDIT_URL_NAME = "edit-application"
NEW_URL_NAME = "/register/"
# We need to pass our human-readable step titles as context to the templates.
+ # TODO-446: Step.ABOUT_YOUR_ORGANIZATION: _("About your organization"),
TITLES = {
Step.ORGANIZATION_TYPE: _("Type of organization"),
Step.TRIBAL_GOVERNMENT: _("Tribal government"),
@@ -92,6 +94,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
# We can use a dictionary with step names and callables that return booleans
# to show or hide particular steps based on the state of the process.
+ # TODO-446: Step.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model("show_about_your_organization", False),
WIZARD_CONDITIONS = {
Step.ORGANIZATION_FEDERAL: lambda w: w.from_model(
"show_organization_federal", False
@@ -372,7 +375,7 @@ class OrganizationContact(ApplicationWizard):
template_name = "application_org_contact.html"
forms = [forms.OrganizationContactForm]
-
+# TODO-446: Probs step 1 after migration? Update typeofwork naming to about_your_organization
class TypeOfWork(ApplicationWizard):
template_name = "application_type_of_work.html"
forms = [forms.TypeOfWorkForm]
From 370480572e3ab11ac259fbddd38276723c1e9825 Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Wed, 6 Sep 2023 09:28:19 -0700
Subject: [PATCH 03/16] Fix double star required bug
---
src/registrar/forms/application_wizard.py | 5 ++---
src/registrar/templates/application_type_of_work.html | 9 ++++-----
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index 22d39e8bb..1982b341b 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -309,11 +309,10 @@ class OrganizationContactForm(RegistrarForm):
)
return federal_agency
-# TODO-446: Update name of form + variable naming
+# TODO-446: Update name of form + variable naming + change label
class TypeOfWorkForm(RegistrarForm):
type_of_work = forms.CharField(
- required=False,
- label="TypeOfWork",
+ label="Type of work",
widget=forms.Textarea(),
validators=[
MaxLengthValidator(
diff --git a/src/registrar/templates/application_type_of_work.html b/src/registrar/templates/application_type_of_work.html
index 7bd02bf32..1bb3e7048 100644
--- a/src/registrar/templates/application_type_of_work.html
+++ b/src/registrar/templates/application_type_of_work.html
@@ -13,16 +13,15 @@
Include links to authorizing legislation, applicable bylaws or charter, or other documentation to support your claims.
- * This question is required.
{% endblock %}
{% block form_required_fields_help_text %}
-{# empty this block so it doesn't show on this page #}
+ *This question is required.
{% endblock %}
{% block form_fields %}
- {% with attr_maxlength=1000 %}
- {% input_with_errors forms.0.type_of_work %}
- {% endwith %}
+ {% with attr_maxlength=1000 add_label_class="usa-sr-only" %}
+ {% input_with_errors forms.0.type_of_work %}
+ {% endwith %}
{% endblock %}
\ No newline at end of file
From 696941aba711cbb5cdb4af20fc3d8591641b6084 Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Wed, 6 Sep 2023 15:58:57 -0700
Subject: [PATCH 04/16] Model update and migration and subsequent variable and
wording changes
---
src/registrar/admin.py | 8 +---
src/registrar/config/urls.py | 3 +-
src/registrar/forms/application_wizard.py | 7 ++--
..._more_organization_information_and_more.py | 42 +++++++++++++++++++
src/registrar/models/domain_application.py | 22 ++--------
src/registrar/models/domain_information.py | 19 +--------
... application_about_your_organization.html} | 5 +--
.../templates/application_review.html | 6 +--
.../templates/application_status.html | 11 -----
src/registrar/tests/common.py | 13 +++---
src/registrar/views/application.py | 17 ++++----
11 files changed, 68 insertions(+), 85 deletions(-)
create mode 100644 src/registrar/migrations/0031_remove_domainapplication_more_organization_information_and_more.py
rename src/registrar/templates/{application_type_of_work.html => application_about_your_organization.html} (83%)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 38a1c407e..664e12a40 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -233,7 +233,6 @@ class DomainApplicationAdmin(ListHeaderAdmin):
search_help_text = "Search by domain or submitter."
# Detail view
- # TODO-446: Add "about_your_organization" + remove "type_of_work" and "more_organization_information"
fieldsets = [
(None, {"fields": ["status", "investigator", "creator"]}),
(
@@ -247,8 +246,7 @@ class DomainApplicationAdmin(ListHeaderAdmin):
"federal_agency",
"federal_type",
"is_election_board",
- "type_of_work",
- "more_organization_information",
+ "about_your_organization",
]
},
),
@@ -284,11 +282,9 @@ class DomainApplicationAdmin(ListHeaderAdmin):
]
# Read only that we'll leverage for CISA Analysts
- # TODO-446: Add "about_your_organization" + remove "type_of_work" and "more_organization_information"
analyst_readonly_fields = [
"creator",
- "type_of_work",
- "more_organization_information",
+ "about_your_organization",
"address_line1",
"address_line2",
"zipcode",
diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py
index 078fe4ed3..9c3624c2c 100644
--- a/src/registrar/config/urls.py
+++ b/src/registrar/config/urls.py
@@ -19,7 +19,6 @@ application_urls = [
path("finished/", views.Finished.as_view(), name="finished"),
]
-# TODO-446: (Step.ABOUT_YOUR_ORGANIZATION, views.AboutYourOrganization),
# dynamically generate the other application_urls
for step, view in [
# add/remove steps here
@@ -28,7 +27,7 @@ for step, view in [
(Step.ORGANIZATION_FEDERAL, views.OrganizationFederal),
(Step.ORGANIZATION_ELECTION, views.OrganizationElection),
(Step.ORGANIZATION_CONTACT, views.OrganizationContact),
- (Step.TYPE_OF_WORK, views.TypeOfWork),
+ (Step.ABOUT_YOUR_ORGANIZATION, views.AboutYourOrganization),
(Step.AUTHORIZING_OFFICIAL, views.AuthorizingOfficial),
(Step.CURRENT_SITES, views.CurrentSites),
(Step.DOTGOV_DOMAIN, views.DotgovDomain),
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index 1982b341b..090bb20b6 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -309,10 +309,9 @@ class OrganizationContactForm(RegistrarForm):
)
return federal_agency
-# TODO-446: Update name of form + variable naming + change label
-class TypeOfWorkForm(RegistrarForm):
- type_of_work = forms.CharField(
- label="Type of work",
+class AboutYourOrganizationForm(RegistrarForm):
+ about_your_organization = forms.CharField(
+ label="About your organization",
widget=forms.Textarea(),
validators=[
MaxLengthValidator(
diff --git a/src/registrar/migrations/0031_remove_domainapplication_more_organization_information_and_more.py b/src/registrar/migrations/0031_remove_domainapplication_more_organization_information_and_more.py
new file mode 100644
index 000000000..70a89e5b5
--- /dev/null
+++ b/src/registrar/migrations/0031_remove_domainapplication_more_organization_information_and_more.py
@@ -0,0 +1,42 @@
+# Generated by Django 4.2.1 on 2023-09-06 16:46
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("registrar", "0030_alter_user_status"),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name="domainapplication",
+ name="more_organization_information",
+ ),
+ migrations.RemoveField(
+ model_name="domainapplication",
+ name="type_of_work",
+ ),
+ migrations.RemoveField(
+ model_name="domaininformation",
+ name="more_organization_information",
+ ),
+ migrations.RemoveField(
+ model_name="domaininformation",
+ name="type_of_work",
+ ),
+ migrations.AddField(
+ model_name="domainapplication",
+ name="about_your_organization",
+ field=models.TextField(
+ blank=True, help_text="Information about your organization", null=True
+ ),
+ ),
+ migrations.AddField(
+ model_name="domaininformation",
+ name="about_your_organization",
+ field=models.TextField(
+ blank=True, help_text="Information about your organization", null=True
+ ),
+ ),
+ ]
diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_application.py
index b8af01e6a..c78a510dc 100644
--- a/src/registrar/models/domain_application.py
+++ b/src/registrar/models/domain_application.py
@@ -378,27 +378,12 @@ class DomainApplication(TimeStampedModel):
help_text="Urbanization (Puerto Rico only)",
)
- type_of_work = models.TextField(
+ about_your_organization = models.TextField(
null=True,
blank=True,
- help_text="Type of work of the organization",
+ help_text="Information about your organization",
)
- # TODO-446:
- # about_your_organization = models.TextField(
- # null=True,
- # blank=True,
- # help_text="Information about your organization",
- # )
-
- more_organization_information = models.TextField(
- null=True,
- blank=True,
- help_text="More information about your organization",
- )
-
- # TODO-446: Remove above bc we don't need this textbox anymore
-
authorizing_official = models.ForeignKey(
"registrar.Contact",
null=True,
@@ -662,8 +647,7 @@ class DomainApplication(TimeStampedModel):
]
return bool(user_choice and user_choice not in excluded)
- # TODO-446: Rename to show_about_your_organization
- def show_type_of_work(self) -> bool:
+ def show_about_your_organization(self) -> bool:
"""Show this step if this is a special district or interstate."""
user_choice = self.organization_type
return user_choice in [
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index f5c62121b..1300d1905 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -134,27 +134,12 @@ class DomainInformation(TimeStampedModel):
verbose_name="Urbanization (Puerto Rico only)",
)
- type_of_work = models.TextField(
+ about_your_organization = models.TextField(
null=True,
blank=True,
- help_text="Type of work of the organization",
- )
-
- # TODO-446:
- # about_your_organization = models.TextField(
- # null=True,
- # blank=True,
- # help_text="Information about your organization",
- # )
-
- more_organization_information = models.TextField(
- null=True,
- blank=True,
- help_text="Further information about the government organization",
+ help_text="Information about your organization",
)
- # TODO-446: Remove above bc we don't need this textbox anymore
-
authorizing_official = models.ForeignKey(
"registrar.Contact",
null=True,
diff --git a/src/registrar/templates/application_type_of_work.html b/src/registrar/templates/application_about_your_organization.html
similarity index 83%
rename from src/registrar/templates/application_type_of_work.html
rename to src/registrar/templates/application_about_your_organization.html
index 1bb3e7048..206f2af54 100644
--- a/src/registrar/templates/application_type_of_work.html
+++ b/src/registrar/templates/application_about_your_organization.html
@@ -1,8 +1,6 @@
{% extends 'application_form.html' %}
{% load field_helpers %}
-
-
{% block form_instructions %}
[For special districts, interstate governments]
We’d like to know more about your organization. Include the following in your response:
@@ -19,9 +17,8 @@
*This question is required.
{% endblock %}
-
{% block form_fields %}
{% with attr_maxlength=1000 add_label_class="usa-sr-only" %}
- {% input_with_errors forms.0.type_of_work %}
+ {% input_with_errors forms.0.about_your_organization %}
{% endwith %}
{% endblock %}
\ No newline at end of file
diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html
index 5f2e3e29a..be81303b8 100644
--- a/src/registrar/templates/application_review.html
+++ b/src/registrar/templates/application_review.html
@@ -46,10 +46,8 @@
Incomplete
{% endif %}
{% endif %}
-
- {% if step == Step.TYPE_OF_WORK %}
- {{ application.type_of_work|default:"Incomplete" }}
- {{ application.more_organization_information|default:"Incomplete" }}
+ {% if step == Step.ABOUT_YOUR_ORGANIZATION %}
+ {{ application.about_your_organization|default:"Incomplete" }}
{% endif %}
{% if step == Step.AUTHORIZING_OFFICIAL %}
{% if application.authorizing_official %}
diff --git a/src/registrar/templates/application_status.html b/src/registrar/templates/application_status.html
index c95b33ad6..b904650b7 100644
--- a/src/registrar/templates/application_status.html
+++ b/src/registrar/templates/application_status.html
@@ -68,21 +68,10 @@
{% include "includes/summary_item.html" with title='Organization name and mailing address' value=domainapplication address='true' heading_level=heading_level %}
{% endif %}
-
-
- {% if domainapplication.type_of_work %}
- {% include "includes/summary_item.html" with title='Type of work' value=domainapplication.type_of_work heading_level=heading_level %}
{% endif %}
- {% if domainapplication.more_organization_information %}
- {% include "includes/summary_item.html" with title='More information about your organization' value=domainapplication.more_organization_information heading_level=heading_level %}
- {% endif %}
-
-
-
{% if domainapplication.authorizing_official %}
{% include "includes/summary_item.html" with title='Authorizing official' value=domainapplication.authorizing_official contact='true' heading_level=heading_level %}
{% endif %}
diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py
index 11e66df62..6580fe51e 100644
--- a/src/registrar/tests/common.py
+++ b/src/registrar/tests/common.py
@@ -241,14 +241,13 @@ class AuditedAdminMockData:
is_policy_acknowledged: boolean = True,
state_territory: str = "NY",
zipcode: str = "10002",
- type_of_work: str = "e-Government",
+ about_your_organization: str = "e-Government",
anything_else: str = "There is more",
authorizing_official: Contact = self.dummy_contact(item_name, "authorizing_official"),
submitter: Contact = self.dummy_contact(item_name, "submitter"),
creator: User = self.dummy_user(item_name, "creator"),
}
""" # noqa
- # TODO-446: Update type_of_work to about_your_organization
common_args = dict(
organization_type=org_type,
federal_type=federal_type,
@@ -259,7 +258,7 @@ class AuditedAdminMockData:
is_policy_acknowledged=True,
state_territory="NY",
zipcode="10002",
- type_of_work="e-Government",
+ about_your_organization="e-Government",
anything_else="There is more",
authorizing_official=self.dummy_contact(item_name, "authorizing_official"),
submitter=self.dummy_contact(item_name, "submitter"),
@@ -434,12 +433,11 @@ def create_user():
password=p,
)
-# TODO-446: Update has_type_of_work to has_about_your_organization
def completed_application(
has_other_contacts=True,
has_current_website=True,
has_alternative_gov_domain=True,
- has_type_of_work=True,
+ has_about_your_organization=True,
has_anything_else=True,
status=DomainApplication.STARTED,
user=False,
@@ -487,9 +485,8 @@ def completed_application(
creator=user,
status=status,
)
- # TODO-446: Update has_type_of_work to has_about_your_organization
- if has_type_of_work:
- domain_application_kwargs["type_of_work"] = "e-Government"
+ if has_about_your_organization:
+ domain_application_kwargs["about_your_organization"] = "e-Government"
if has_anything_else:
domain_application_kwargs["anything_else"] = "There is more"
diff --git a/src/registrar/views/application.py b/src/registrar/views/application.py
index b3f3a8517..362682806 100644
--- a/src/registrar/views/application.py
+++ b/src/registrar/views/application.py
@@ -17,7 +17,6 @@ from .utility import DomainApplicationPermissionView, ApplicationWizardPermissio
logger = logging.getLogger(__name__)
-# TODO-446: ABOUT_YOUR_ORGANIZATION = "about_your_organization"
class Step(StrEnum):
"""
Names for each page of the application wizard.
@@ -31,7 +30,7 @@ class Step(StrEnum):
ORGANIZATION_FEDERAL = "organization_federal"
ORGANIZATION_ELECTION = "organization_election"
ORGANIZATION_CONTACT = "organization_contact"
- TYPE_OF_WORK = "type_of_work"
+ ABOUT_YOUR_ORGANIZATION = "about_your_organization"
AUTHORIZING_OFFICIAL = "authorizing_official"
CURRENT_SITES = "current_sites"
DOTGOV_DOMAIN = "dotgov_domain"
@@ -72,14 +71,13 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
EDIT_URL_NAME = "edit-application"
NEW_URL_NAME = "/register/"
# We need to pass our human-readable step titles as context to the templates.
- # TODO-446: Step.ABOUT_YOUR_ORGANIZATION: _("About your organization"),
TITLES = {
Step.ORGANIZATION_TYPE: _("Type of organization"),
Step.TRIBAL_GOVERNMENT: _("Tribal government"),
Step.ORGANIZATION_FEDERAL: _("Federal government branch"),
Step.ORGANIZATION_ELECTION: _("Election office"),
Step.ORGANIZATION_CONTACT: _("Organization name and mailing address"),
- Step.TYPE_OF_WORK: _("Type of work"),
+ Step.ABOUT_YOUR_ORGANIZATION: _("About your organization"),
Step.AUTHORIZING_OFFICIAL: _("Authorizing official"),
Step.CURRENT_SITES: _("Current website for your organization"),
Step.DOTGOV_DOMAIN: _(".gov domain"),
@@ -94,7 +92,6 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
# We can use a dictionary with step names and callables that return booleans
# to show or hide particular steps based on the state of the process.
- # TODO-446: Step.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model("show_about_your_organization", False),
WIZARD_CONDITIONS = {
Step.ORGANIZATION_FEDERAL: lambda w: w.from_model(
"show_organization_federal", False
@@ -103,7 +100,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
Step.ORGANIZATION_ELECTION: lambda w: w.from_model(
"show_organization_election", False
),
- Step.TYPE_OF_WORK: lambda w: w.from_model("show_type_of_work", False),
+ Step.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model("show_about_your_organization", False),
Step.NO_OTHER_CONTACTS: lambda w: w.from_model(
"show_no_other_contacts_rationale", False
),
@@ -375,10 +372,10 @@ class OrganizationContact(ApplicationWizard):
template_name = "application_org_contact.html"
forms = [forms.OrganizationContactForm]
-# TODO-446: Probs step 1 after migration? Update typeofwork naming to about_your_organization
-class TypeOfWork(ApplicationWizard):
- template_name = "application_type_of_work.html"
- forms = [forms.TypeOfWorkForm]
+
+class AboutYourOrganization(ApplicationWizard):
+ template_name = "application_about_your_organization.html"
+ forms = [forms.AboutYourOrganizationForm]
class AuthorizingOfficial(ApplicationWizard):
From 34a2f39fdfe8bcd3444fc1c1b2ea2e2b3373da37 Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Wed, 6 Sep 2023 16:40:57 -0700
Subject: [PATCH 05/16] Fix linting and tets
---
src/registrar/forms/application_wizard.py | 7 +++-
src/registrar/models/domain_information.py | 2 +-
src/registrar/tests/common.py | 1 +
src/registrar/tests/test_admin.py | 10 ++---
src/registrar/tests/test_emails.py | 18 ++++-----
src/registrar/tests/test_forms.py | 46 +++-------------------
src/registrar/tests/test_views.py | 20 ++++------
src/registrar/views/application.py | 4 +-
8 files changed, 35 insertions(+), 73 deletions(-)
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index 090bb20b6..1bd1ca3fb 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -309,6 +309,7 @@ class OrganizationContactForm(RegistrarForm):
)
return federal_agency
+
class AboutYourOrganizationForm(RegistrarForm):
about_your_organization = forms.CharField(
label="About your organization",
@@ -319,12 +320,14 @@ class AboutYourOrganizationForm(RegistrarForm):
message="Response must be less than 1000 characters.",
)
],
- # TODO-446: Confirm if this error message wording is ok, prev was "Enter the type of work your organization does."
+ # TODO-446: Confirm if err msg wording is ok, previously
+ # TODO-446: "Enter the type of work your organization does."
error_messages={
- "required": ("Enter information about your organization.")
+ "required": ("Enter the information about your organization.")
},
)
+
class AuthorizingOfficialForm(RegistrarForm):
def to_database(self, obj):
if not self.is_valid():
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index 1300d1905..c1c6142d0 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -139,7 +139,7 @@ class DomainInformation(TimeStampedModel):
blank=True,
help_text="Information about your organization",
)
-
+
authorizing_official = models.ForeignKey(
"registrar.Contact",
null=True,
diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py
index 6580fe51e..5d7923f55 100644
--- a/src/registrar/tests/common.py
+++ b/src/registrar/tests/common.py
@@ -433,6 +433,7 @@ def create_user():
password=p,
)
+
def completed_application(
has_other_contacts=True,
has_current_website=True,
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index 44ca259fe..79e2bb146 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -315,8 +315,7 @@ class TestDomainApplicationAdmin(TestCase):
request.user = self.superuser
readonly_fields = self.admin.get_readonly_fields(request, application)
-
- # TODO-446: Add about_your_organization + remove type_of_work and more_organization_information
+
expected_fields = [
"id",
"created_at",
@@ -338,8 +337,7 @@ class TestDomainApplicationAdmin(TestCase):
"state_territory",
"zipcode",
"urbanization",
- "type_of_work",
- "more_organization_information",
+ "about_your_organization",
"authorizing_official",
"approved_domain",
"requested_domain",
@@ -361,11 +359,9 @@ class TestDomainApplicationAdmin(TestCase):
readonly_fields = self.admin.get_readonly_fields(request)
- # TODO-446: Add about_your_organization + remove type_of_work and more_organization_information
expected_fields = [
"creator",
- "type_of_work",
- "more_organization_information",
+ "about_your_organization",
"address_line1",
"address_line2",
"zipcode",
diff --git a/src/registrar/tests/test_emails.py b/src/registrar/tests/test_emails.py
index 178b3c473..52ea0d7b8 100644
--- a/src/registrar/tests/test_emails.py
+++ b/src/registrar/tests/test_emails.py
@@ -125,29 +125,27 @@ class TestEmails(TestCase):
# spacing should be right between adjacent elements
self.assertRegex(body, r"city.gov\n\nPurpose of your domain:")
- # TODO-446: Update type_of_work -> about_your_organization
@boto3_mocking.patching
- def test_submission_confirmation_type_of_work_spacing(self):
- """Test line spacing with type of work."""
- application = completed_application(has_type_of_work=True)
+ def test_submission_confirmation_about_your_organization_spacing(self):
+ """Test line spacing with about your organization."""
+ application = completed_application(has_about_your_organization=True)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client_class):
application.submit()
_, kwargs = self.mock_client.send_email.call_args
body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"]
- self.assertIn("Type of work:", body)
+ self.assertIn("About your organization:", body)
# spacing should be right between adjacent elements
- self.assertRegex(body, r"10002\n\nType of work:")
+ self.assertRegex(body, r"10002\n\nAbout your organization:")
- # TODO-446: Update type_of_work -> about_your_organization
@boto3_mocking.patching
- def test_submission_confirmation_no_type_of_work_spacing(self):
+ def test_submission_confirmation_no_about_your_organization_spacing(self):
"""Test line spacing without type of work."""
- application = completed_application(has_type_of_work=False)
+ application = completed_application(has_about_your_organization=False)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client_class):
application.submit()
_, kwargs = self.mock_client.send_email.call_args
body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"]
- self.assertNotIn("Type of work:", body)
+ self.assertNotIn("About your organization:", body)
# spacing should be right between adjacent elements
self.assertRegex(body, r"10002\n\nAuthorizing official:")
diff --git a/src/registrar/tests/test_forms.py b/src/registrar/tests/test_forms.py
index 7f84eb025..d8ebdd310 100644
--- a/src/registrar/tests/test_forms.py
+++ b/src/registrar/tests/test_forms.py
@@ -13,7 +13,7 @@ from registrar.forms.application_wizard import (
TribalGovernmentForm,
PurposeForm,
AnythingElseForm,
- TypeOfWorkForm,
+ AboutYourOrganizationForm,
)
from registrar.forms.domain import ContactForm
@@ -118,8 +118,7 @@ class TestFormValidation(TestCase):
["Response must be less than 1000 characters."],
)
- # TODO-446: Update type_of_work -> about_your_organization
- def test_anything_else_form_type_of_work_character_count_invalid(self):
+ def test_anything_else_form_about_your_organization_character_count_invalid(self):
"""Response must be less than 1000 characters."""
form = AnythingElseForm(
data={
@@ -148,45 +147,12 @@ class TestFormValidation(TestCase):
["Response must be less than 1000 characters."],
)
- # TODO-446: Can remove bc don't have this textbox anymore
- def test_anything_else_form_more_organization_information_character_count_invalid(
- self,
- ):
- """Response must be less than 1000 characters."""
- form = TypeOfWorkForm(
- data={
- "more_organization_information": "Bacon ipsum dolor amet fatback"
- "shankle, drumstick doner chicken landjaeger turkey andouille."
- "Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
- "ground round strip steak, jowl tail chuck ribeye bacon"
- "beef ribs swine filet ball tip pancetta strip steak sirloin"
- "mignon ham spare ribs rump. Tail shank biltong beef ribs doner"
- "buffalo swine bacon. Tongue cow picanha brisket bacon chuck"
- "leberkas pork loin pork, drumstick capicola. Doner short loin"
- "ground round fatback turducken chislic shoulder turducken"
- "spare ribs, burgdoggen kielbasa kevin frankfurter ball tip"
- "pancetta cupim. Turkey meatball andouille porchetta hamburger"
- "pork chop corned beef. Brisket short ribs turducken, pork chop"
- "chislic turkey ball pork chop leberkas rump, rump bacon, jowl"
- "tip ham. Shankle salami tongue venison short ribs kielbasa"
- "tri-tip ham hock swine hamburger. Flank meatball corned beef"
- "cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
- "beef ribs rump jowl tenderloin swine sausage biltong"
- "bacon rump tail boudin meatball boudin meatball boudin"
- "strip steak pastrami."
- }
- )
- self.assertEqual(
- form.errors["more_organization_information"],
- ["Response must be less than 1000 characters."],
- )
-
- # TODO-446: Update type_of_work -> about_your_organization in data and assertEqual
def test_anything_else_form_character_count_invalid(self):
"""Response must be less than 1000 characters."""
- form = TypeOfWorkForm(
+ form = AboutYourOrganizationForm(
data={
- "type_of_work": "Bacon ipsum dolor amet fatback strip steak pastrami"
+ "about_your_organization":
+ "Bacon ipsum dolor amet fatback strip steak pastrami"
"shankle, drumstick doner chicken landjaeger turkey andouille."
"Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
"ground round strip steak, jowl tail chuck ribeye bacon"
@@ -207,7 +173,7 @@ class TestFormValidation(TestCase):
}
)
self.assertEqual(
- form.errors["type_of_work"],
+ form.errors["about_your_organization"],
["Response must be less than 1000 characters."],
)
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index baea45b8b..147e58424 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -663,11 +663,12 @@ class DomainApplicationTests(TestWithUser, WebTest):
# the post request should return a redirect to the type of work page
# if it was successful.
self.assertEqual(contact_result.status_code, 302)
- self.assertEqual(contact_result["Location"], "/register/type_of_work/")
- # TODO-446: self.assertEqual(contact_result["Location"], "/register/about_your_organization/")
+ self.assertEqual(
+ contact_result["Location"],
+ "/register/about_your_organization/"
+ )
- # TODO-446: Update type_of_work -> about_your_organization
- def test_application_type_of_work_special(self):
+ def test_application_about_your_organization_special(self):
"""Special districts have to answer an additional question."""
type_page = self.app.get(reverse("application:")).follow()
# django-webtest does not handle cookie-based sessions well because it keeps
@@ -686,9 +687,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
contact_page = type_result.follow()
- self.assertContains(contact_page, self.TITLES[Step.TYPE_OF_WORK])
- # TODO-446: self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
-
+ self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
def test_application_no_other_contacts(self):
"""Applicants with no other contacts have to give a reason."""
@@ -708,8 +707,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
actual_url_slug = no_contacts_page.request.path.split("/")[-2]
self.assertEqual(expected_url_slug, actual_url_slug)
- # TODO-446: Update type_of_work -> about_your_organization
- def test_application_type_of_work_interstate(self):
+ def test_application_about_your_organiztion_interstate(self):
"""Special districts have to answer an additional question."""
type_page = self.app.get(reverse("application:")).follow()
# django-webtest does not handle cookie-based sessions well because it keeps
@@ -728,9 +726,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
contact_page = type_result.follow()
- self.assertContains(contact_page, self.TITLES[Step.TYPE_OF_WORK])
- # TODO-446: self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
-
+ self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
def test_application_tribal_government(self):
"""Tribal organizations have to answer an additional question."""
diff --git a/src/registrar/views/application.py b/src/registrar/views/application.py
index 362682806..878da262b 100644
--- a/src/registrar/views/application.py
+++ b/src/registrar/views/application.py
@@ -100,7 +100,9 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
Step.ORGANIZATION_ELECTION: lambda w: w.from_model(
"show_organization_election", False
),
- Step.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model("show_about_your_organization", False),
+ Step.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model(
+ "show_about_your_organization", False
+ ),
Step.NO_OTHER_CONTACTS: lambda w: w.from_model(
"show_no_other_contacts_rationale", False
),
From 193ba9395976249f0857f513d157e0601d1e3a53 Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Wed, 6 Sep 2023 16:51:49 -0700
Subject: [PATCH 06/16] Fix emails
---
.../templates/emails/includes/application_summary.txt | 6 +++---
src/registrar/tests/test_emails.py | 4 ++--
src/registrar/tests/test_views.py | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/registrar/templates/emails/includes/application_summary.txt b/src/registrar/templates/emails/includes/application_summary.txt
index 07519a8f0..293dad2e4 100644
--- a/src/registrar/templates/emails/includes/application_summary.txt
+++ b/src/registrar/templates/emails/includes/application_summary.txt
@@ -10,9 +10,9 @@ Organization name and mailing address:
{{ application.city }}, {{ application.state_territory }}
{{ application.zipcode }}{% if application.urbanization %}
{{ application.urbanization }}{% endif %}{% endspaceless %}
-{% if application.type_of_work %}{# if block makes one newline if it's false #}
-Type of work:
-{% spaceless %}{{ application.type_of_work }}{% endspaceless %}
+{% if application.about_your_organization %}{# if block makes one newline if it's false #}
+About your organization:
+{% spaceless %}{{ application.about_your_organization }}{% endspaceless %}
{% endif %}
Authorizing official:
{% spaceless %}{% include "emails/includes/contact.txt" with contact=application.authorizing_official %}{% endspaceless %}
diff --git a/src/registrar/tests/test_emails.py b/src/registrar/tests/test_emails.py
index 52ea0d7b8..7bce52668 100644
--- a/src/registrar/tests/test_emails.py
+++ b/src/registrar/tests/test_emails.py
@@ -48,7 +48,7 @@ class TestEmails(TestCase):
self.assertIn("Testy2 Tester2", body)
self.assertIn("Current website for your organization:", body)
self.assertIn("city.com", body)
- self.assertIn("Type of work:", body)
+ self.assertIn("About your organization:", body)
self.assertIn("Anything else", body)
@boto3_mocking.patching
@@ -139,7 +139,7 @@ class TestEmails(TestCase):
@boto3_mocking.patching
def test_submission_confirmation_no_about_your_organization_spacing(self):
- """Test line spacing without type of work."""
+ """Test line spacing without about your organization."""
application = completed_application(has_about_your_organization=False)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client_class):
application.submit()
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index 147e58424..8b95f65cd 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -660,8 +660,8 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
contact_result = org_contact_form.submit()
- # the post request should return a redirect to the type of work page
- # if it was successful.
+ # the post request should return a redirect to the
+ # about your organization page if it was successful.
self.assertEqual(contact_result.status_code, 302)
self.assertEqual(
contact_result["Location"],
From 84ea4920a03dc0030856ee485233647caf72ca86 Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Thu, 7 Sep 2023 09:46:32 -0700
Subject: [PATCH 07/16] Fix reformatting
---
src/registrar/forms/application_wizard.py | 4 +---
src/registrar/tests/test_forms.py | 3 +--
src/registrar/tests/test_views.py | 3 +--
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index 1bd1ca3fb..a92831541 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -322,9 +322,7 @@ class AboutYourOrganizationForm(RegistrarForm):
],
# TODO-446: Confirm if err msg wording is ok, previously
# TODO-446: "Enter the type of work your organization does."
- error_messages={
- "required": ("Enter the information about your organization.")
- },
+ error_messages={"required": ("Enter the information about your organization.")},
)
diff --git a/src/registrar/tests/test_forms.py b/src/registrar/tests/test_forms.py
index d8ebdd310..ec012c796 100644
--- a/src/registrar/tests/test_forms.py
+++ b/src/registrar/tests/test_forms.py
@@ -151,8 +151,7 @@ class TestFormValidation(TestCase):
"""Response must be less than 1000 characters."""
form = AboutYourOrganizationForm(
data={
- "about_your_organization":
- "Bacon ipsum dolor amet fatback strip steak pastrami"
+ "about_your_organization": "Bacon ipsum dolor amet fatback strip steak pastrami"
"shankle, drumstick doner chicken landjaeger turkey andouille."
"Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
"ground round strip steak, jowl tail chuck ribeye bacon"
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index 8b95f65cd..f9f70a817 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -664,8 +664,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
# about your organization page if it was successful.
self.assertEqual(contact_result.status_code, 302)
self.assertEqual(
- contact_result["Location"],
- "/register/about_your_organization/"
+ contact_result["Location"], "/register/about_your_organization/"
)
def test_application_about_your_organization_special(self):
From 225628a7e4137952546daaae313d02571020e668 Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Thu, 7 Sep 2023 10:00:19 -0700
Subject: [PATCH 08/16] Fix small reformat and lint
---
src/registrar/tests/test_forms.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/registrar/tests/test_forms.py b/src/registrar/tests/test_forms.py
index ec012c796..95be195ba 100644
--- a/src/registrar/tests/test_forms.py
+++ b/src/registrar/tests/test_forms.py
@@ -151,7 +151,8 @@ class TestFormValidation(TestCase):
"""Response must be less than 1000 characters."""
form = AboutYourOrganizationForm(
data={
- "about_your_organization": "Bacon ipsum dolor amet fatback strip steak pastrami"
+ "about_your_organization": "Bacon ipsum dolor amet fatback"
+ "strip steak pastrami"
"shankle, drumstick doner chicken landjaeger turkey andouille."
"Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
"ground round strip steak, jowl tail chuck ribeye bacon"
From 20d524f5e47639b7f490d06a0a6a11d8d41fe46c Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Fri, 8 Sep 2023 14:02:33 -0700
Subject: [PATCH 09/16] Remove extraneous wording
---
src/registrar/templates/application_about_your_organization.html | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/registrar/templates/application_about_your_organization.html b/src/registrar/templates/application_about_your_organization.html
index 206f2af54..f1b843b7a 100644
--- a/src/registrar/templates/application_about_your_organization.html
+++ b/src/registrar/templates/application_about_your_organization.html
@@ -2,7 +2,6 @@
{% load field_helpers %}
{% block form_instructions %}
- [For special districts, interstate governments]
We’d like to know more about your organization. Include the following in your response:
From 2f6799c62baeff117e9832a2561e954ff22fa2f4 Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Tue, 12 Sep 2023 16:58:24 -0700
Subject: [PATCH 10/16] Remove comment and update error message wording
---
src/registrar/forms/application_wizard.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index a92831541..105e48953 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -320,9 +320,7 @@ class AboutYourOrganizationForm(RegistrarForm):
message="Response must be less than 1000 characters.",
)
],
- # TODO-446: Confirm if err msg wording is ok, previously
- # TODO-446: "Enter the type of work your organization does."
- error_messages={"required": ("Enter the information about your organization.")},
+ error_messages={"required": ("Enter more information about your organization.")},
)
From 7c1520a0c2c52b6e5a79ab9862e031c0d0a3a216 Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Tue, 12 Sep 2023 17:10:32 -0700
Subject: [PATCH 11/16] Fix reformatting issues
---
src/registrar/forms/application_wizard.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index 105e48953..93ec18aad 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -320,7 +320,9 @@ class AboutYourOrganizationForm(RegistrarForm):
message="Response must be less than 1000 characters.",
)
],
- error_messages={"required": ("Enter more information about your organization.")},
+ error_messages={
+ "required": ("Enter more information about your organization.")
+ },
)
From 9dc4568908e63cfa8547b471f2c2a5b70970899e Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Tue, 12 Sep 2023 17:15:54 -0700
Subject: [PATCH 12/16] Fix migration
---
.../migrations/0033_merge_20230913_0015.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 src/registrar/migrations/0033_merge_20230913_0015.py
diff --git a/src/registrar/migrations/0033_merge_20230913_0015.py b/src/registrar/migrations/0033_merge_20230913_0015.py
new file mode 100644
index 000000000..82d60d34c
--- /dev/null
+++ b/src/registrar/migrations/0033_merge_20230913_0015.py
@@ -0,0 +1,15 @@
+# Generated by Django 4.2.1 on 2023-09-13 00:15
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ (
+ "registrar",
+ "0031_remove_domainapplication_more_organization_information_and_more",
+ ),
+ ("registrar", "0032_merge_0031_alter_domain_state_0031_transitiondomain"),
+ ]
+
+ operations = []
From e4a2c6d03028ba4e3fef29ec60a7ce1257e1904d Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Wed, 13 Sep 2023 10:53:07 -0600
Subject: [PATCH 13/16] Fix sorting bug
---
src/registrar/templates/domain_users.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/registrar/templates/domain_users.html b/src/registrar/templates/domain_users.html
index 09d391dc8..22b9d18d1 100644
--- a/src/registrar/templates/domain_users.html
+++ b/src/registrar/templates/domain_users.html
@@ -20,7 +20,7 @@
{% for permission in domain.permissions.all %}
-
+ |
{{ permission.user.email }}
|
{{ permission.role|title }} |
@@ -57,7 +57,7 @@
{% for invitation in domain.invitations.all %}
-
+ |
{{ invitation.email }}
|
{{ invitation.created_at|date }} |
From 8fd74fa6acc51798022b2b4586fa427a579c27fb Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Wed, 13 Sep 2023 10:47:25 -0700
Subject: [PATCH 14/16] Fix migrations
---
.../migrations/0033_merge_20230913_0015.py | 15 ---------------
...ion_more_organization_information_and_more.py} | 4 ++--
2 files changed, 2 insertions(+), 17 deletions(-)
delete mode 100644 src/registrar/migrations/0033_merge_20230913_0015.py
rename src/registrar/migrations/{0031_remove_domainapplication_more_organization_information_and_more.py => 0033_remove_domainapplication_more_organization_information_and_more.py} (90%)
diff --git a/src/registrar/migrations/0033_merge_20230913_0015.py b/src/registrar/migrations/0033_merge_20230913_0015.py
deleted file mode 100644
index 82d60d34c..000000000
--- a/src/registrar/migrations/0033_merge_20230913_0015.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Generated by Django 4.2.1 on 2023-09-13 00:15
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
- dependencies = [
- (
- "registrar",
- "0031_remove_domainapplication_more_organization_information_and_more",
- ),
- ("registrar", "0032_merge_0031_alter_domain_state_0031_transitiondomain"),
- ]
-
- operations = []
diff --git a/src/registrar/migrations/0031_remove_domainapplication_more_organization_information_and_more.py b/src/registrar/migrations/0033_remove_domainapplication_more_organization_information_and_more.py
similarity index 90%
rename from src/registrar/migrations/0031_remove_domainapplication_more_organization_information_and_more.py
rename to src/registrar/migrations/0033_remove_domainapplication_more_organization_information_and_more.py
index 70a89e5b5..9387a53bb 100644
--- a/src/registrar/migrations/0031_remove_domainapplication_more_organization_information_and_more.py
+++ b/src/registrar/migrations/0033_remove_domainapplication_more_organization_information_and_more.py
@@ -1,11 +1,11 @@
-# Generated by Django 4.2.1 on 2023-09-06 16:46
+# Generated by Django 4.2.1 on 2023-09-13 16:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0030_alter_user_status"),
+ ("registrar", "0032_merge_0031_alter_domain_state_0031_transitiondomain"),
]
operations = [
From 9622c58c5239c444ffb1bd997e5d6c452c28fb97 Mon Sep 17 00:00:00 2001
From: Rebecca H
Date: Wed, 13 Sep 2023 14:58:50 -0700
Subject: [PATCH 15/16] Revert "446 - Change Type Of Work to About Your
Organization"
---
src/registrar/admin.py | 6 ++-
src/registrar/config/urls.py | 2 +-
src/registrar/forms/application_wizard.py | 29 +++++++++++--
..._more_organization_information_and_more.py | 42 ------------------
src/registrar/models/domain_application.py | 12 ++++--
src/registrar/models/domain_information.py | 10 ++++-
.../application_about_your_organization.html | 23 ----------
.../templates/application_review.html | 5 ++-
.../templates/application_status.html | 8 +++-
.../templates/application_type_of_work.html | 10 +++++
.../emails/includes/application_summary.txt | 6 +--
src/registrar/tests/common.py | 10 ++---
src/registrar/tests/test_admin.py | 6 ++-
src/registrar/tests/test_emails.py | 20 ++++-----
src/registrar/tests/test_forms.py | 43 ++++++++++++++++---
src/registrar/tests/test_views.py | 16 +++----
src/registrar/views/application.py | 14 +++---
17 files changed, 138 insertions(+), 124 deletions(-)
delete mode 100644 src/registrar/migrations/0033_remove_domainapplication_more_organization_information_and_more.py
delete mode 100644 src/registrar/templates/application_about_your_organization.html
create mode 100644 src/registrar/templates/application_type_of_work.html
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 82daee6f8..f187dfdb1 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -484,7 +484,8 @@ class DomainApplicationAdmin(ListHeaderAdmin):
"federal_agency",
"federal_type",
"is_election_board",
- "about_your_organization",
+ "type_of_work",
+ "more_organization_information",
]
},
),
@@ -522,7 +523,8 @@ class DomainApplicationAdmin(ListHeaderAdmin):
# Read only that we'll leverage for CISA Analysts
analyst_readonly_fields = [
"creator",
- "about_your_organization",
+ "type_of_work",
+ "more_organization_information",
"address_line1",
"address_line2",
"zipcode",
diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py
index 9c3624c2c..0f136c932 100644
--- a/src/registrar/config/urls.py
+++ b/src/registrar/config/urls.py
@@ -27,7 +27,7 @@ for step, view in [
(Step.ORGANIZATION_FEDERAL, views.OrganizationFederal),
(Step.ORGANIZATION_ELECTION, views.OrganizationElection),
(Step.ORGANIZATION_CONTACT, views.OrganizationContact),
- (Step.ABOUT_YOUR_ORGANIZATION, views.AboutYourOrganization),
+ (Step.TYPE_OF_WORK, views.TypeOfWork),
(Step.AUTHORIZING_OFFICIAL, views.AuthorizingOfficial),
(Step.CURRENT_SITES, views.CurrentSites),
(Step.DOTGOV_DOMAIN, views.DotgovDomain),
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index 93ec18aad..578a501d3 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -310,9 +310,28 @@ class OrganizationContactForm(RegistrarForm):
return federal_agency
-class AboutYourOrganizationForm(RegistrarForm):
- about_your_organization = forms.CharField(
- label="About your organization",
+class TypeOfWorkForm(RegistrarForm):
+ type_of_work = forms.CharField(
+ # label has to end in a space to get the label_suffix to show
+ label="What type of work does your organization do? ",
+ widget=forms.Textarea(),
+ validators=[
+ MaxLengthValidator(
+ 1000,
+ message="Response must be less than 1000 characters.",
+ )
+ ],
+ error_messages={"required": "Enter the type of work your organization does."},
+ )
+
+ more_organization_information = forms.CharField(
+ # label has to end in a space to get the label_suffix to show
+ label=(
+ "Describe how your organization is a government organization that is"
+ " independent of a state government. Include links to authorizing"
+ " legislation, applicable bylaws or charter, or other documentation to"
+ " support your claims. "
+ ),
widget=forms.Textarea(),
validators=[
MaxLengthValidator(
@@ -321,7 +340,9 @@ class AboutYourOrganizationForm(RegistrarForm):
)
],
error_messages={
- "required": ("Enter more information about your organization.")
+ "required": (
+ "Describe how your organization is independent of a state government."
+ )
},
)
diff --git a/src/registrar/migrations/0033_remove_domainapplication_more_organization_information_and_more.py b/src/registrar/migrations/0033_remove_domainapplication_more_organization_information_and_more.py
deleted file mode 100644
index 9387a53bb..000000000
--- a/src/registrar/migrations/0033_remove_domainapplication_more_organization_information_and_more.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Generated by Django 4.2.1 on 2023-09-13 16:58
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
- dependencies = [
- ("registrar", "0032_merge_0031_alter_domain_state_0031_transitiondomain"),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name="domainapplication",
- name="more_organization_information",
- ),
- migrations.RemoveField(
- model_name="domainapplication",
- name="type_of_work",
- ),
- migrations.RemoveField(
- model_name="domaininformation",
- name="more_organization_information",
- ),
- migrations.RemoveField(
- model_name="domaininformation",
- name="type_of_work",
- ),
- migrations.AddField(
- model_name="domainapplication",
- name="about_your_organization",
- field=models.TextField(
- blank=True, help_text="Information about your organization", null=True
- ),
- ),
- migrations.AddField(
- model_name="domaininformation",
- name="about_your_organization",
- field=models.TextField(
- blank=True, help_text="Information about your organization", null=True
- ),
- ),
- ]
diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_application.py
index c78a510dc..b1230b703 100644
--- a/src/registrar/models/domain_application.py
+++ b/src/registrar/models/domain_application.py
@@ -378,10 +378,16 @@ class DomainApplication(TimeStampedModel):
help_text="Urbanization (Puerto Rico only)",
)
- about_your_organization = models.TextField(
+ type_of_work = models.TextField(
null=True,
blank=True,
- help_text="Information about your organization",
+ help_text="Type of work of the organization",
+ )
+
+ more_organization_information = models.TextField(
+ null=True,
+ blank=True,
+ help_text="More information about your organization",
)
authorizing_official = models.ForeignKey(
@@ -647,7 +653,7 @@ class DomainApplication(TimeStampedModel):
]
return bool(user_choice and user_choice not in excluded)
- def show_about_your_organization(self) -> bool:
+ def show_type_of_work(self) -> bool:
"""Show this step if this is a special district or interstate."""
user_choice = self.organization_type
return user_choice in [
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index c1c6142d0..b12039e73 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -134,10 +134,16 @@ class DomainInformation(TimeStampedModel):
verbose_name="Urbanization (Puerto Rico only)",
)
- about_your_organization = models.TextField(
+ type_of_work = models.TextField(
null=True,
blank=True,
- help_text="Information about your organization",
+ help_text="Type of work of the organization",
+ )
+
+ more_organization_information = models.TextField(
+ null=True,
+ blank=True,
+ help_text="Further information about the government organization",
)
authorizing_official = models.ForeignKey(
diff --git a/src/registrar/templates/application_about_your_organization.html b/src/registrar/templates/application_about_your_organization.html
deleted file mode 100644
index f1b843b7a..000000000
--- a/src/registrar/templates/application_about_your_organization.html
+++ /dev/null
@@ -1,23 +0,0 @@
-{% extends 'application_form.html' %}
-{% load field_helpers %}
-
-{% block form_instructions %}
- We’d like to know more about your organization. Include the following in your response:
-
-
- - The type of work your organization does
- - How your organization is a government organization that is independent of a state government
- - Include links to authorizing legislation, applicable bylaws or charter, or other documentation to support your claims.
-
-
-{% endblock %}
-
-{% block form_required_fields_help_text %}
- *This question is required.
-{% endblock %}
-
-{% block form_fields %}
- {% with attr_maxlength=1000 add_label_class="usa-sr-only" %}
- {% input_with_errors forms.0.about_your_organization %}
- {% endwith %}
-{% endblock %}
\ No newline at end of file
diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html
index be81303b8..b9ac97871 100644
--- a/src/registrar/templates/application_review.html
+++ b/src/registrar/templates/application_review.html
@@ -46,8 +46,9 @@
Incomplete
{% endif %}
{% endif %}
- {% if step == Step.ABOUT_YOUR_ORGANIZATION %}
- {{ application.about_your_organization|default:"Incomplete" }}
+ {% if step == Step.TYPE_OF_WORK %}
+ {{ application.type_of_work|default:"Incomplete" }}
+ {{ application.more_organization_information|default:"Incomplete" }}
{% endif %}
{% if step == Step.AUTHORIZING_OFFICIAL %}
{% if application.authorizing_official %}
diff --git a/src/registrar/templates/application_status.html b/src/registrar/templates/application_status.html
index a68c07c8a..67e8e7664 100644
--- a/src/registrar/templates/application_status.html
+++ b/src/registrar/templates/application_status.html
@@ -77,8 +77,12 @@
{% include "includes/summary_item.html" with title='Organization name and mailing address' value=domainapplication address='true' heading_level=heading_level %}
{% endif %}
- {% if domainapplication.about_your_organization %}
- {% include "includes/summary_item.html" with title='About your organization' value=domainapplication.about_your_organization heading_level=heading_level %}
+ {% if domainapplication.type_of_work %}
+ {% include "includes/summary_item.html" with title='Type of work' value=domainapplication.type_of_work heading_level=heading_level %}
+ {% endif %}
+
+ {% if domainapplication.more_organization_information %}
+ {% include "includes/summary_item.html" with title='More information about your organization' value=domainapplication.more_organization_information heading_level=heading_level %}
{% endif %}
{% if domainapplication.authorizing_official %}
diff --git a/src/registrar/templates/application_type_of_work.html b/src/registrar/templates/application_type_of_work.html
new file mode 100644
index 000000000..9ad58936f
--- /dev/null
+++ b/src/registrar/templates/application_type_of_work.html
@@ -0,0 +1,10 @@
+{% extends 'application_form.html' %}
+{% load field_helpers %}
+
+
+{% block form_fields %}
+ {% with attr_maxlength=1000 %}
+ {% input_with_errors forms.0.type_of_work %}
+ {% input_with_errors forms.0.more_organization_information %}
+ {% endwith %}
+{% endblock %}
\ No newline at end of file
diff --git a/src/registrar/templates/emails/includes/application_summary.txt b/src/registrar/templates/emails/includes/application_summary.txt
index 293dad2e4..07519a8f0 100644
--- a/src/registrar/templates/emails/includes/application_summary.txt
+++ b/src/registrar/templates/emails/includes/application_summary.txt
@@ -10,9 +10,9 @@ Organization name and mailing address:
{{ application.city }}, {{ application.state_territory }}
{{ application.zipcode }}{% if application.urbanization %}
{{ application.urbanization }}{% endif %}{% endspaceless %}
-{% if application.about_your_organization %}{# if block makes one newline if it's false #}
-About your organization:
-{% spaceless %}{{ application.about_your_organization }}{% endspaceless %}
+{% if application.type_of_work %}{# if block makes one newline if it's false #}
+Type of work:
+{% spaceless %}{{ application.type_of_work }}{% endspaceless %}
{% endif %}
Authorizing official:
{% spaceless %}{% include "emails/includes/contact.txt" with contact=application.authorizing_official %}{% endspaceless %}
diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py
index e21431321..c312acca0 100644
--- a/src/registrar/tests/common.py
+++ b/src/registrar/tests/common.py
@@ -250,7 +250,7 @@ class AuditedAdminMockData:
is_policy_acknowledged: boolean = True,
state_territory: str = "NY",
zipcode: str = "10002",
- about_your_organization: str = "e-Government",
+ type_of_work: str = "e-Government",
anything_else: str = "There is more",
authorizing_official: Contact = self.dummy_contact(item_name, "authorizing_official"),
submitter: Contact = self.dummy_contact(item_name, "submitter"),
@@ -267,7 +267,7 @@ class AuditedAdminMockData:
is_policy_acknowledged=True,
state_territory="NY",
zipcode="10002",
- about_your_organization="e-Government",
+ type_of_work="e-Government",
anything_else="There is more",
authorizing_official=self.dummy_contact(item_name, "authorizing_official"),
submitter=self.dummy_contact(item_name, "submitter"),
@@ -453,7 +453,7 @@ def completed_application(
has_other_contacts=True,
has_current_website=True,
has_alternative_gov_domain=True,
- has_about_your_organization=True,
+ has_type_of_work=True,
has_anything_else=True,
status=DomainApplication.STARTED,
user=False,
@@ -501,8 +501,8 @@ def completed_application(
creator=user,
status=status,
)
- if has_about_your_organization:
- domain_application_kwargs["about_your_organization"] = "e-Government"
+ if has_type_of_work:
+ domain_application_kwargs["type_of_work"] = "e-Government"
if has_anything_else:
domain_application_kwargs["anything_else"] = "There is more"
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index b28a5dcec..a24ee9a6e 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -441,7 +441,8 @@ class TestDomainApplicationAdmin(TestCase):
"state_territory",
"zipcode",
"urbanization",
- "about_your_organization",
+ "type_of_work",
+ "more_organization_information",
"authorizing_official",
"approved_domain",
"requested_domain",
@@ -465,7 +466,8 @@ class TestDomainApplicationAdmin(TestCase):
expected_fields = [
"creator",
- "about_your_organization",
+ "type_of_work",
+ "more_organization_information",
"address_line1",
"address_line2",
"zipcode",
diff --git a/src/registrar/tests/test_emails.py b/src/registrar/tests/test_emails.py
index 7bce52668..b5c6cd428 100644
--- a/src/registrar/tests/test_emails.py
+++ b/src/registrar/tests/test_emails.py
@@ -48,7 +48,7 @@ class TestEmails(TestCase):
self.assertIn("Testy2 Tester2", body)
self.assertIn("Current website for your organization:", body)
self.assertIn("city.com", body)
- self.assertIn("About your organization:", body)
+ self.assertIn("Type of work:", body)
self.assertIn("Anything else", body)
@boto3_mocking.patching
@@ -126,26 +126,26 @@ class TestEmails(TestCase):
self.assertRegex(body, r"city.gov\n\nPurpose of your domain:")
@boto3_mocking.patching
- def test_submission_confirmation_about_your_organization_spacing(self):
- """Test line spacing with about your organization."""
- application = completed_application(has_about_your_organization=True)
+ def test_submission_confirmation_type_of_work_spacing(self):
+ """Test line spacing with type of work."""
+ application = completed_application(has_type_of_work=True)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client_class):
application.submit()
_, kwargs = self.mock_client.send_email.call_args
body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"]
- self.assertIn("About your organization:", body)
+ self.assertIn("Type of work:", body)
# spacing should be right between adjacent elements
- self.assertRegex(body, r"10002\n\nAbout your organization:")
+ self.assertRegex(body, r"10002\n\nType of work:")
@boto3_mocking.patching
- def test_submission_confirmation_no_about_your_organization_spacing(self):
- """Test line spacing without about your organization."""
- application = completed_application(has_about_your_organization=False)
+ def test_submission_confirmation_no_type_of_work_spacing(self):
+ """Test line spacing without type of work."""
+ application = completed_application(has_type_of_work=False)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client_class):
application.submit()
_, kwargs = self.mock_client.send_email.call_args
body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"]
- self.assertNotIn("About your organization:", body)
+ self.assertNotIn("Type of work:", body)
# spacing should be right between adjacent elements
self.assertRegex(body, r"10002\n\nAuthorizing official:")
diff --git a/src/registrar/tests/test_forms.py b/src/registrar/tests/test_forms.py
index 95be195ba..173362943 100644
--- a/src/registrar/tests/test_forms.py
+++ b/src/registrar/tests/test_forms.py
@@ -13,7 +13,7 @@ from registrar.forms.application_wizard import (
TribalGovernmentForm,
PurposeForm,
AnythingElseForm,
- AboutYourOrganizationForm,
+ TypeOfWorkForm,
)
from registrar.forms.domain import ContactForm
@@ -118,7 +118,7 @@ class TestFormValidation(TestCase):
["Response must be less than 1000 characters."],
)
- def test_anything_else_form_about_your_organization_character_count_invalid(self):
+ def test_anything_else_form_type_of_work_character_count_invalid(self):
"""Response must be less than 1000 characters."""
form = AnythingElseForm(
data={
@@ -147,12 +147,43 @@ class TestFormValidation(TestCase):
["Response must be less than 1000 characters."],
)
+ def test_anything_else_form_more_organization_information_character_count_invalid(
+ self,
+ ):
+ """Response must be less than 1000 characters."""
+ form = TypeOfWorkForm(
+ data={
+ "more_organization_information": "Bacon ipsum dolor amet fatback"
+ "shankle, drumstick doner chicken landjaeger turkey andouille."
+ "Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
+ "ground round strip steak, jowl tail chuck ribeye bacon"
+ "beef ribs swine filet ball tip pancetta strip steak sirloin"
+ "mignon ham spare ribs rump. Tail shank biltong beef ribs doner"
+ "buffalo swine bacon. Tongue cow picanha brisket bacon chuck"
+ "leberkas pork loin pork, drumstick capicola. Doner short loin"
+ "ground round fatback turducken chislic shoulder turducken"
+ "spare ribs, burgdoggen kielbasa kevin frankfurter ball tip"
+ "pancetta cupim. Turkey meatball andouille porchetta hamburger"
+ "pork chop corned beef. Brisket short ribs turducken, pork chop"
+ "chislic turkey ball pork chop leberkas rump, rump bacon, jowl"
+ "tip ham. Shankle salami tongue venison short ribs kielbasa"
+ "tri-tip ham hock swine hamburger. Flank meatball corned beef"
+ "cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
+ "beef ribs rump jowl tenderloin swine sausage biltong"
+ "bacon rump tail boudin meatball boudin meatball boudin"
+ "strip steak pastrami."
+ }
+ )
+ self.assertEqual(
+ form.errors["more_organization_information"],
+ ["Response must be less than 1000 characters."],
+ )
+
def test_anything_else_form_character_count_invalid(self):
"""Response must be less than 1000 characters."""
- form = AboutYourOrganizationForm(
+ form = TypeOfWorkForm(
data={
- "about_your_organization": "Bacon ipsum dolor amet fatback"
- "strip steak pastrami"
+ "type_of_work": "Bacon ipsum dolor amet fatback strip steak pastrami"
"shankle, drumstick doner chicken landjaeger turkey andouille."
"Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
"ground round strip steak, jowl tail chuck ribeye bacon"
@@ -173,7 +204,7 @@ class TestFormValidation(TestCase):
}
)
self.assertEqual(
- form.errors["about_your_organization"],
+ form.errors["type_of_work"],
["Response must be less than 1000 characters."],
)
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index 318cc261d..96ce76e1a 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -660,14 +660,12 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
contact_result = org_contact_form.submit()
- # the post request should return a redirect to the
- # about your organization page if it was successful.
+ # the post request should return a redirect to the type of work page
+ # if it was successful.
self.assertEqual(contact_result.status_code, 302)
- self.assertEqual(
- contact_result["Location"], "/register/about_your_organization/"
- )
+ self.assertEqual(contact_result["Location"], "/register/type_of_work/")
- def test_application_about_your_organization_special(self):
+ def test_application_type_of_work_special(self):
"""Special districts have to answer an additional question."""
type_page = self.app.get(reverse("application:")).follow()
# django-webtest does not handle cookie-based sessions well because it keeps
@@ -686,7 +684,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
contact_page = type_result.follow()
- self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
+ self.assertContains(contact_page, self.TITLES[Step.TYPE_OF_WORK])
def test_application_no_other_contacts(self):
"""Applicants with no other contacts have to give a reason."""
@@ -706,7 +704,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
actual_url_slug = no_contacts_page.request.path.split("/")[-2]
self.assertEqual(expected_url_slug, actual_url_slug)
- def test_application_about_your_organiztion_interstate(self):
+ def test_application_type_of_work_interstate(self):
"""Special districts have to answer an additional question."""
type_page = self.app.get(reverse("application:")).follow()
# django-webtest does not handle cookie-based sessions well because it keeps
@@ -725,7 +723,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
contact_page = type_result.follow()
- self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
+ self.assertContains(contact_page, self.TITLES[Step.TYPE_OF_WORK])
def test_application_tribal_government(self):
"""Tribal organizations have to answer an additional question."""
diff --git a/src/registrar/views/application.py b/src/registrar/views/application.py
index 878da262b..23d7348e9 100644
--- a/src/registrar/views/application.py
+++ b/src/registrar/views/application.py
@@ -30,7 +30,7 @@ class Step(StrEnum):
ORGANIZATION_FEDERAL = "organization_federal"
ORGANIZATION_ELECTION = "organization_election"
ORGANIZATION_CONTACT = "organization_contact"
- ABOUT_YOUR_ORGANIZATION = "about_your_organization"
+ TYPE_OF_WORK = "type_of_work"
AUTHORIZING_OFFICIAL = "authorizing_official"
CURRENT_SITES = "current_sites"
DOTGOV_DOMAIN = "dotgov_domain"
@@ -77,7 +77,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
Step.ORGANIZATION_FEDERAL: _("Federal government branch"),
Step.ORGANIZATION_ELECTION: _("Election office"),
Step.ORGANIZATION_CONTACT: _("Organization name and mailing address"),
- Step.ABOUT_YOUR_ORGANIZATION: _("About your organization"),
+ Step.TYPE_OF_WORK: _("Type of work"),
Step.AUTHORIZING_OFFICIAL: _("Authorizing official"),
Step.CURRENT_SITES: _("Current website for your organization"),
Step.DOTGOV_DOMAIN: _(".gov domain"),
@@ -100,9 +100,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
Step.ORGANIZATION_ELECTION: lambda w: w.from_model(
"show_organization_election", False
),
- Step.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model(
- "show_about_your_organization", False
- ),
+ Step.TYPE_OF_WORK: lambda w: w.from_model("show_type_of_work", False),
Step.NO_OTHER_CONTACTS: lambda w: w.from_model(
"show_no_other_contacts_rationale", False
),
@@ -375,9 +373,9 @@ class OrganizationContact(ApplicationWizard):
forms = [forms.OrganizationContactForm]
-class AboutYourOrganization(ApplicationWizard):
- template_name = "application_about_your_organization.html"
- forms = [forms.AboutYourOrganizationForm]
+class TypeOfWork(ApplicationWizard):
+ template_name = "application_type_of_work.html"
+ forms = [forms.TypeOfWorkForm]
class AuthorizingOfficial(ApplicationWizard):
From 6965d593f5254b0ef092edcf619fd5475c2a479b Mon Sep 17 00:00:00 2001
From: Rebecca Hsieh
Date: Wed, 13 Sep 2023 15:28:01 -0700
Subject: [PATCH 16/16] Compressing Nicolle and Alysia migrations with mine to
be the one migration that rules them all
---
src/registrar/admin.py | 6 +-
src/registrar/config/urls.py | 2 +-
src/registrar/forms/application_wizard.py | 29 +----
.../migrations/0031_alter_domain_state.py | 30 -----
.../migrations/0031_transitiondomain.py | 60 ---------
.../0031_transitiondomain_and_more.py | 122 ++++++++++++++++++
...lter_domain_state_0031_transitiondomain.py | 12 --
..._state_alter_publiccontact_contact_type.py | 44 -------
src/registrar/models/domain_application.py | 12 +-
src/registrar/models/domain_information.py | 10 +-
.../application_about_your_organization.html | 23 ++++
.../templates/application_review.html | 5 +-
.../templates/application_status.html | 8 +-
.../templates/application_type_of_work.html | 10 --
.../emails/includes/application_summary.txt | 6 +-
src/registrar/tests/common.py | 10 +-
src/registrar/tests/test_admin.py | 6 +-
src/registrar/tests/test_emails.py | 20 +--
src/registrar/tests/test_forms.py | 43 +-----
src/registrar/tests/test_views.py | 16 ++-
src/registrar/views/application.py | 14 +-
21 files changed, 204 insertions(+), 284 deletions(-)
delete mode 100644 src/registrar/migrations/0031_alter_domain_state.py
delete mode 100644 src/registrar/migrations/0031_transitiondomain.py
create mode 100644 src/registrar/migrations/0031_transitiondomain_and_more.py
delete mode 100644 src/registrar/migrations/0032_merge_0031_alter_domain_state_0031_transitiondomain.py
delete mode 100644 src/registrar/migrations/0033_alter_domain_state_alter_publiccontact_contact_type.py
create mode 100644 src/registrar/templates/application_about_your_organization.html
delete mode 100644 src/registrar/templates/application_type_of_work.html
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index f187dfdb1..82daee6f8 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -484,8 +484,7 @@ class DomainApplicationAdmin(ListHeaderAdmin):
"federal_agency",
"federal_type",
"is_election_board",
- "type_of_work",
- "more_organization_information",
+ "about_your_organization",
]
},
),
@@ -523,8 +522,7 @@ class DomainApplicationAdmin(ListHeaderAdmin):
# Read only that we'll leverage for CISA Analysts
analyst_readonly_fields = [
"creator",
- "type_of_work",
- "more_organization_information",
+ "about_your_organization",
"address_line1",
"address_line2",
"zipcode",
diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py
index 0f136c932..9c3624c2c 100644
--- a/src/registrar/config/urls.py
+++ b/src/registrar/config/urls.py
@@ -27,7 +27,7 @@ for step, view in [
(Step.ORGANIZATION_FEDERAL, views.OrganizationFederal),
(Step.ORGANIZATION_ELECTION, views.OrganizationElection),
(Step.ORGANIZATION_CONTACT, views.OrganizationContact),
- (Step.TYPE_OF_WORK, views.TypeOfWork),
+ (Step.ABOUT_YOUR_ORGANIZATION, views.AboutYourOrganization),
(Step.AUTHORIZING_OFFICIAL, views.AuthorizingOfficial),
(Step.CURRENT_SITES, views.CurrentSites),
(Step.DOTGOV_DOMAIN, views.DotgovDomain),
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index 578a501d3..93ec18aad 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -310,28 +310,9 @@ class OrganizationContactForm(RegistrarForm):
return federal_agency
-class TypeOfWorkForm(RegistrarForm):
- type_of_work = forms.CharField(
- # label has to end in a space to get the label_suffix to show
- label="What type of work does your organization do? ",
- widget=forms.Textarea(),
- validators=[
- MaxLengthValidator(
- 1000,
- message="Response must be less than 1000 characters.",
- )
- ],
- error_messages={"required": "Enter the type of work your organization does."},
- )
-
- more_organization_information = forms.CharField(
- # label has to end in a space to get the label_suffix to show
- label=(
- "Describe how your organization is a government organization that is"
- " independent of a state government. Include links to authorizing"
- " legislation, applicable bylaws or charter, or other documentation to"
- " support your claims. "
- ),
+class AboutYourOrganizationForm(RegistrarForm):
+ about_your_organization = forms.CharField(
+ label="About your organization",
widget=forms.Textarea(),
validators=[
MaxLengthValidator(
@@ -340,9 +321,7 @@ class TypeOfWorkForm(RegistrarForm):
)
],
error_messages={
- "required": (
- "Describe how your organization is independent of a state government."
- )
+ "required": ("Enter more information about your organization.")
},
)
diff --git a/src/registrar/migrations/0031_alter_domain_state.py b/src/registrar/migrations/0031_alter_domain_state.py
deleted file mode 100644
index 2545adb27..000000000
--- a/src/registrar/migrations/0031_alter_domain_state.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Generated by Django 4.2.1 on 2023-09-07 17:53
-
-from django.db import migrations
-import django_fsm
-
-
-class Migration(migrations.Migration):
- dependencies = [
- ("registrar", "0030_alter_user_status"),
- ]
-
- operations = [
- migrations.AlterField(
- model_name="domain",
- name="state",
- field=django_fsm.FSMField(
- choices=[
- ("created", "Created"),
- ("deleted", "Deleted"),
- ("unknown", "Unknown"),
- ("ready", "Ready"),
- ("onhold", "Onhold"),
- ],
- default="unknown",
- help_text="Very basic info about the lifecycle of this domain object",
- max_length=21,
- protected=True,
- ),
- ),
- ]
diff --git a/src/registrar/migrations/0031_transitiondomain.py b/src/registrar/migrations/0031_transitiondomain.py
deleted file mode 100644
index e72a8d85a..000000000
--- a/src/registrar/migrations/0031_transitiondomain.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# Generated by Django 4.2.1 on 2023-09-11 14:44
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
- dependencies = [
- ("registrar", "0030_alter_user_status"),
- ]
-
- operations = [
- migrations.CreateModel(
- name="TransitionDomain",
- fields=[
- (
- "id",
- models.BigAutoField(
- auto_created=True,
- primary_key=True,
- serialize=False,
- verbose_name="ID",
- ),
- ),
- ("created_at", models.DateTimeField(auto_now_add=True)),
- ("updated_at", models.DateTimeField(auto_now=True)),
- (
- "username",
- models.TextField(
- help_text="Username - this will be an email address",
- verbose_name="Username",
- ),
- ),
- (
- "domain_name",
- models.TextField(blank=True, null=True, verbose_name="Domain name"),
- ),
- (
- "status",
- models.CharField(
- blank=True,
- choices=[("created", "Created"), ("hold", "Hold")],
- help_text="domain status during the transfer",
- max_length=255,
- verbose_name="Status",
- ),
- ),
- (
- "email_sent",
- models.BooleanField(
- default=False,
- help_text="indicates whether email was sent",
- verbose_name="email sent",
- ),
- ),
- ],
- options={
- "abstract": False,
- },
- ),
- ]
diff --git a/src/registrar/migrations/0031_transitiondomain_and_more.py b/src/registrar/migrations/0031_transitiondomain_and_more.py
new file mode 100644
index 000000000..79bf7eab4
--- /dev/null
+++ b/src/registrar/migrations/0031_transitiondomain_and_more.py
@@ -0,0 +1,122 @@
+# Generated by Django 4.2.1 on 2023-09-13 22:25
+
+from django.db import migrations, models
+import django_fsm
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("registrar", "0030_alter_user_status"),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name="TransitionDomain",
+ fields=[
+ (
+ "id",
+ models.BigAutoField(
+ auto_created=True,
+ primary_key=True,
+ serialize=False,
+ verbose_name="ID",
+ ),
+ ),
+ ("created_at", models.DateTimeField(auto_now_add=True)),
+ ("updated_at", models.DateTimeField(auto_now=True)),
+ (
+ "username",
+ models.TextField(
+ help_text="Username - this will be an email address",
+ verbose_name="Username",
+ ),
+ ),
+ (
+ "domain_name",
+ models.TextField(blank=True, null=True, verbose_name="Domain name"),
+ ),
+ (
+ "status",
+ models.CharField(
+ blank=True,
+ choices=[("created", "Created"), ("hold", "Hold")],
+ help_text="domain status during the transfer",
+ max_length=255,
+ verbose_name="Status",
+ ),
+ ),
+ (
+ "email_sent",
+ models.BooleanField(
+ default=False,
+ help_text="indicates whether email was sent",
+ verbose_name="email sent",
+ ),
+ ),
+ ],
+ options={
+ "abstract": False,
+ },
+ ),
+ migrations.RemoveField(
+ model_name="domainapplication",
+ name="more_organization_information",
+ ),
+ migrations.RemoveField(
+ model_name="domainapplication",
+ name="type_of_work",
+ ),
+ migrations.RemoveField(
+ model_name="domaininformation",
+ name="more_organization_information",
+ ),
+ migrations.RemoveField(
+ model_name="domaininformation",
+ name="type_of_work",
+ ),
+ migrations.AddField(
+ model_name="domainapplication",
+ name="about_your_organization",
+ field=models.TextField(
+ blank=True, help_text="Information about your organization", null=True
+ ),
+ ),
+ migrations.AddField(
+ model_name="domaininformation",
+ name="about_your_organization",
+ field=models.TextField(
+ blank=True, help_text="Information about your organization", null=True
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domain",
+ name="state",
+ field=django_fsm.FSMField(
+ choices=[
+ ("unknown", "Unknown"),
+ ("dns needed", "Dns Needed"),
+ ("ready", "Ready"),
+ ("on hold", "On Hold"),
+ ("deleted", "Deleted"),
+ ],
+ default="unknown",
+ help_text="Very basic info about the lifecycle of this domain object",
+ max_length=21,
+ protected=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="publiccontact",
+ name="contact_type",
+ field=models.CharField(
+ choices=[
+ ("registrant", "Registrant"),
+ ("admin", "Administrative"),
+ ("tech", "Technical"),
+ ("security", "Security"),
+ ],
+ help_text="For which type of WHOIS contact",
+ max_length=14,
+ ),
+ ),
+ ]
diff --git a/src/registrar/migrations/0032_merge_0031_alter_domain_state_0031_transitiondomain.py b/src/registrar/migrations/0032_merge_0031_alter_domain_state_0031_transitiondomain.py
deleted file mode 100644
index 4c0a38427..000000000
--- a/src/registrar/migrations/0032_merge_0031_alter_domain_state_0031_transitiondomain.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# Generated by Django 4.2.1 on 2023-09-12 14:12
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
- dependencies = [
- ("registrar", "0031_alter_domain_state"),
- ("registrar", "0031_transitiondomain"),
- ]
-
- operations = []
diff --git a/src/registrar/migrations/0033_alter_domain_state_alter_publiccontact_contact_type.py b/src/registrar/migrations/0033_alter_domain_state_alter_publiccontact_contact_type.py
deleted file mode 100644
index 57f05de14..000000000
--- a/src/registrar/migrations/0033_alter_domain_state_alter_publiccontact_contact_type.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# Generated by Django 4.2.1 on 2023-09-13 00:46
-
-from django.db import migrations, models
-import django_fsm
-
-
-class Migration(migrations.Migration):
- dependencies = [
- ("registrar", "0032_merge_0031_alter_domain_state_0031_transitiondomain"),
- ]
-
- operations = [
- migrations.AlterField(
- model_name="domain",
- name="state",
- field=django_fsm.FSMField(
- choices=[
- ("unknown", "Unknown"),
- ("dns needed", "Dns Needed"),
- ("ready", "Ready"),
- ("on hold", "On Hold"),
- ("deleted", "Deleted"),
- ],
- default="unknown",
- help_text="Very basic info about the lifecycle of this domain object",
- max_length=21,
- protected=True,
- ),
- ),
- migrations.AlterField(
- model_name="publiccontact",
- name="contact_type",
- field=models.CharField(
- choices=[
- ("registrant", "Registrant"),
- ("admin", "Administrative"),
- ("tech", "Technical"),
- ("security", "Security"),
- ],
- help_text="For which type of WHOIS contact",
- max_length=14,
- ),
- ),
- ]
diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_application.py
index b1230b703..c78a510dc 100644
--- a/src/registrar/models/domain_application.py
+++ b/src/registrar/models/domain_application.py
@@ -378,16 +378,10 @@ class DomainApplication(TimeStampedModel):
help_text="Urbanization (Puerto Rico only)",
)
- type_of_work = models.TextField(
+ about_your_organization = models.TextField(
null=True,
blank=True,
- help_text="Type of work of the organization",
- )
-
- more_organization_information = models.TextField(
- null=True,
- blank=True,
- help_text="More information about your organization",
+ help_text="Information about your organization",
)
authorizing_official = models.ForeignKey(
@@ -653,7 +647,7 @@ class DomainApplication(TimeStampedModel):
]
return bool(user_choice and user_choice not in excluded)
- def show_type_of_work(self) -> bool:
+ def show_about_your_organization(self) -> bool:
"""Show this step if this is a special district or interstate."""
user_choice = self.organization_type
return user_choice in [
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index b12039e73..c1c6142d0 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -134,16 +134,10 @@ class DomainInformation(TimeStampedModel):
verbose_name="Urbanization (Puerto Rico only)",
)
- type_of_work = models.TextField(
+ about_your_organization = models.TextField(
null=True,
blank=True,
- help_text="Type of work of the organization",
- )
-
- more_organization_information = models.TextField(
- null=True,
- blank=True,
- help_text="Further information about the government organization",
+ help_text="Information about your organization",
)
authorizing_official = models.ForeignKey(
diff --git a/src/registrar/templates/application_about_your_organization.html b/src/registrar/templates/application_about_your_organization.html
new file mode 100644
index 000000000..f1b843b7a
--- /dev/null
+++ b/src/registrar/templates/application_about_your_organization.html
@@ -0,0 +1,23 @@
+{% extends 'application_form.html' %}
+{% load field_helpers %}
+
+{% block form_instructions %}
+ We’d like to know more about your organization. Include the following in your response:
+
+
+ - The type of work your organization does
+ - How your organization is a government organization that is independent of a state government
+ - Include links to authorizing legislation, applicable bylaws or charter, or other documentation to support your claims.
+
+
+{% endblock %}
+
+{% block form_required_fields_help_text %}
+ *This question is required.
+{% endblock %}
+
+{% block form_fields %}
+ {% with attr_maxlength=1000 add_label_class="usa-sr-only" %}
+ {% input_with_errors forms.0.about_your_organization %}
+ {% endwith %}
+{% endblock %}
\ No newline at end of file
diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html
index b9ac97871..be81303b8 100644
--- a/src/registrar/templates/application_review.html
+++ b/src/registrar/templates/application_review.html
@@ -46,9 +46,8 @@
Incomplete
{% endif %}
{% endif %}
- {% if step == Step.TYPE_OF_WORK %}
- {{ application.type_of_work|default:"Incomplete" }}
- {{ application.more_organization_information|default:"Incomplete" }}
+ {% if step == Step.ABOUT_YOUR_ORGANIZATION %}
+ {{ application.about_your_organization|default:"Incomplete" }}
{% endif %}
{% if step == Step.AUTHORIZING_OFFICIAL %}
{% if application.authorizing_official %}
diff --git a/src/registrar/templates/application_status.html b/src/registrar/templates/application_status.html
index 67e8e7664..a68c07c8a 100644
--- a/src/registrar/templates/application_status.html
+++ b/src/registrar/templates/application_status.html
@@ -77,12 +77,8 @@
{% include "includes/summary_item.html" with title='Organization name and mailing address' value=domainapplication address='true' heading_level=heading_level %}
{% endif %}
- {% if domainapplication.type_of_work %}
- {% include "includes/summary_item.html" with title='Type of work' value=domainapplication.type_of_work heading_level=heading_level %}
- {% endif %}
-
- {% if domainapplication.more_organization_information %}
- {% include "includes/summary_item.html" with title='More information about your organization' value=domainapplication.more_organization_information heading_level=heading_level %}
+ {% if domainapplication.about_your_organization %}
+ {% include "includes/summary_item.html" with title='About your organization' value=domainapplication.about_your_organization heading_level=heading_level %}
{% endif %}
{% if domainapplication.authorizing_official %}
diff --git a/src/registrar/templates/application_type_of_work.html b/src/registrar/templates/application_type_of_work.html
deleted file mode 100644
index 9ad58936f..000000000
--- a/src/registrar/templates/application_type_of_work.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{% extends 'application_form.html' %}
-{% load field_helpers %}
-
-
-{% block form_fields %}
- {% with attr_maxlength=1000 %}
- {% input_with_errors forms.0.type_of_work %}
- {% input_with_errors forms.0.more_organization_information %}
- {% endwith %}
-{% endblock %}
\ No newline at end of file
diff --git a/src/registrar/templates/emails/includes/application_summary.txt b/src/registrar/templates/emails/includes/application_summary.txt
index 07519a8f0..293dad2e4 100644
--- a/src/registrar/templates/emails/includes/application_summary.txt
+++ b/src/registrar/templates/emails/includes/application_summary.txt
@@ -10,9 +10,9 @@ Organization name and mailing address:
{{ application.city }}, {{ application.state_territory }}
{{ application.zipcode }}{% if application.urbanization %}
{{ application.urbanization }}{% endif %}{% endspaceless %}
-{% if application.type_of_work %}{# if block makes one newline if it's false #}
-Type of work:
-{% spaceless %}{{ application.type_of_work }}{% endspaceless %}
+{% if application.about_your_organization %}{# if block makes one newline if it's false #}
+About your organization:
+{% spaceless %}{{ application.about_your_organization }}{% endspaceless %}
{% endif %}
Authorizing official:
{% spaceless %}{% include "emails/includes/contact.txt" with contact=application.authorizing_official %}{% endspaceless %}
diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py
index c312acca0..e21431321 100644
--- a/src/registrar/tests/common.py
+++ b/src/registrar/tests/common.py
@@ -250,7 +250,7 @@ class AuditedAdminMockData:
is_policy_acknowledged: boolean = True,
state_territory: str = "NY",
zipcode: str = "10002",
- type_of_work: str = "e-Government",
+ about_your_organization: str = "e-Government",
anything_else: str = "There is more",
authorizing_official: Contact = self.dummy_contact(item_name, "authorizing_official"),
submitter: Contact = self.dummy_contact(item_name, "submitter"),
@@ -267,7 +267,7 @@ class AuditedAdminMockData:
is_policy_acknowledged=True,
state_territory="NY",
zipcode="10002",
- type_of_work="e-Government",
+ about_your_organization="e-Government",
anything_else="There is more",
authorizing_official=self.dummy_contact(item_name, "authorizing_official"),
submitter=self.dummy_contact(item_name, "submitter"),
@@ -453,7 +453,7 @@ def completed_application(
has_other_contacts=True,
has_current_website=True,
has_alternative_gov_domain=True,
- has_type_of_work=True,
+ has_about_your_organization=True,
has_anything_else=True,
status=DomainApplication.STARTED,
user=False,
@@ -501,8 +501,8 @@ def completed_application(
creator=user,
status=status,
)
- if has_type_of_work:
- domain_application_kwargs["type_of_work"] = "e-Government"
+ if has_about_your_organization:
+ domain_application_kwargs["about_your_organization"] = "e-Government"
if has_anything_else:
domain_application_kwargs["anything_else"] = "There is more"
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index a24ee9a6e..b28a5dcec 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -441,8 +441,7 @@ class TestDomainApplicationAdmin(TestCase):
"state_territory",
"zipcode",
"urbanization",
- "type_of_work",
- "more_organization_information",
+ "about_your_organization",
"authorizing_official",
"approved_domain",
"requested_domain",
@@ -466,8 +465,7 @@ class TestDomainApplicationAdmin(TestCase):
expected_fields = [
"creator",
- "type_of_work",
- "more_organization_information",
+ "about_your_organization",
"address_line1",
"address_line2",
"zipcode",
diff --git a/src/registrar/tests/test_emails.py b/src/registrar/tests/test_emails.py
index b5c6cd428..7bce52668 100644
--- a/src/registrar/tests/test_emails.py
+++ b/src/registrar/tests/test_emails.py
@@ -48,7 +48,7 @@ class TestEmails(TestCase):
self.assertIn("Testy2 Tester2", body)
self.assertIn("Current website for your organization:", body)
self.assertIn("city.com", body)
- self.assertIn("Type of work:", body)
+ self.assertIn("About your organization:", body)
self.assertIn("Anything else", body)
@boto3_mocking.patching
@@ -126,26 +126,26 @@ class TestEmails(TestCase):
self.assertRegex(body, r"city.gov\n\nPurpose of your domain:")
@boto3_mocking.patching
- def test_submission_confirmation_type_of_work_spacing(self):
- """Test line spacing with type of work."""
- application = completed_application(has_type_of_work=True)
+ def test_submission_confirmation_about_your_organization_spacing(self):
+ """Test line spacing with about your organization."""
+ application = completed_application(has_about_your_organization=True)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client_class):
application.submit()
_, kwargs = self.mock_client.send_email.call_args
body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"]
- self.assertIn("Type of work:", body)
+ self.assertIn("About your organization:", body)
# spacing should be right between adjacent elements
- self.assertRegex(body, r"10002\n\nType of work:")
+ self.assertRegex(body, r"10002\n\nAbout your organization:")
@boto3_mocking.patching
- def test_submission_confirmation_no_type_of_work_spacing(self):
- """Test line spacing without type of work."""
- application = completed_application(has_type_of_work=False)
+ def test_submission_confirmation_no_about_your_organization_spacing(self):
+ """Test line spacing without about your organization."""
+ application = completed_application(has_about_your_organization=False)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client_class):
application.submit()
_, kwargs = self.mock_client.send_email.call_args
body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"]
- self.assertNotIn("Type of work:", body)
+ self.assertNotIn("About your organization:", body)
# spacing should be right between adjacent elements
self.assertRegex(body, r"10002\n\nAuthorizing official:")
diff --git a/src/registrar/tests/test_forms.py b/src/registrar/tests/test_forms.py
index 173362943..95be195ba 100644
--- a/src/registrar/tests/test_forms.py
+++ b/src/registrar/tests/test_forms.py
@@ -13,7 +13,7 @@ from registrar.forms.application_wizard import (
TribalGovernmentForm,
PurposeForm,
AnythingElseForm,
- TypeOfWorkForm,
+ AboutYourOrganizationForm,
)
from registrar.forms.domain import ContactForm
@@ -118,7 +118,7 @@ class TestFormValidation(TestCase):
["Response must be less than 1000 characters."],
)
- def test_anything_else_form_type_of_work_character_count_invalid(self):
+ def test_anything_else_form_about_your_organization_character_count_invalid(self):
"""Response must be less than 1000 characters."""
form = AnythingElseForm(
data={
@@ -147,43 +147,12 @@ class TestFormValidation(TestCase):
["Response must be less than 1000 characters."],
)
- def test_anything_else_form_more_organization_information_character_count_invalid(
- self,
- ):
- """Response must be less than 1000 characters."""
- form = TypeOfWorkForm(
- data={
- "more_organization_information": "Bacon ipsum dolor amet fatback"
- "shankle, drumstick doner chicken landjaeger turkey andouille."
- "Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
- "ground round strip steak, jowl tail chuck ribeye bacon"
- "beef ribs swine filet ball tip pancetta strip steak sirloin"
- "mignon ham spare ribs rump. Tail shank biltong beef ribs doner"
- "buffalo swine bacon. Tongue cow picanha brisket bacon chuck"
- "leberkas pork loin pork, drumstick capicola. Doner short loin"
- "ground round fatback turducken chislic shoulder turducken"
- "spare ribs, burgdoggen kielbasa kevin frankfurter ball tip"
- "pancetta cupim. Turkey meatball andouille porchetta hamburger"
- "pork chop corned beef. Brisket short ribs turducken, pork chop"
- "chislic turkey ball pork chop leberkas rump, rump bacon, jowl"
- "tip ham. Shankle salami tongue venison short ribs kielbasa"
- "tri-tip ham hock swine hamburger. Flank meatball corned beef"
- "cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
- "beef ribs rump jowl tenderloin swine sausage biltong"
- "bacon rump tail boudin meatball boudin meatball boudin"
- "strip steak pastrami."
- }
- )
- self.assertEqual(
- form.errors["more_organization_information"],
- ["Response must be less than 1000 characters."],
- )
-
def test_anything_else_form_character_count_invalid(self):
"""Response must be less than 1000 characters."""
- form = TypeOfWorkForm(
+ form = AboutYourOrganizationForm(
data={
- "type_of_work": "Bacon ipsum dolor amet fatback strip steak pastrami"
+ "about_your_organization": "Bacon ipsum dolor amet fatback"
+ "strip steak pastrami"
"shankle, drumstick doner chicken landjaeger turkey andouille."
"Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
"ground round strip steak, jowl tail chuck ribeye bacon"
@@ -204,7 +173,7 @@ class TestFormValidation(TestCase):
}
)
self.assertEqual(
- form.errors["type_of_work"],
+ form.errors["about_your_organization"],
["Response must be less than 1000 characters."],
)
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index 96ce76e1a..318cc261d 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -660,12 +660,14 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
contact_result = org_contact_form.submit()
- # the post request should return a redirect to the type of work page
- # if it was successful.
+ # the post request should return a redirect to the
+ # about your organization page if it was successful.
self.assertEqual(contact_result.status_code, 302)
- self.assertEqual(contact_result["Location"], "/register/type_of_work/")
+ self.assertEqual(
+ contact_result["Location"], "/register/about_your_organization/"
+ )
- def test_application_type_of_work_special(self):
+ def test_application_about_your_organization_special(self):
"""Special districts have to answer an additional question."""
type_page = self.app.get(reverse("application:")).follow()
# django-webtest does not handle cookie-based sessions well because it keeps
@@ -684,7 +686,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
contact_page = type_result.follow()
- self.assertContains(contact_page, self.TITLES[Step.TYPE_OF_WORK])
+ self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
def test_application_no_other_contacts(self):
"""Applicants with no other contacts have to give a reason."""
@@ -704,7 +706,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
actual_url_slug = no_contacts_page.request.path.split("/")[-2]
self.assertEqual(expected_url_slug, actual_url_slug)
- def test_application_type_of_work_interstate(self):
+ def test_application_about_your_organiztion_interstate(self):
"""Special districts have to answer an additional question."""
type_page = self.app.get(reverse("application:")).follow()
# django-webtest does not handle cookie-based sessions well because it keeps
@@ -723,7 +725,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
contact_page = type_result.follow()
- self.assertContains(contact_page, self.TITLES[Step.TYPE_OF_WORK])
+ self.assertContains(contact_page, self.TITLES[Step.ABOUT_YOUR_ORGANIZATION])
def test_application_tribal_government(self):
"""Tribal organizations have to answer an additional question."""
diff --git a/src/registrar/views/application.py b/src/registrar/views/application.py
index 23d7348e9..878da262b 100644
--- a/src/registrar/views/application.py
+++ b/src/registrar/views/application.py
@@ -30,7 +30,7 @@ class Step(StrEnum):
ORGANIZATION_FEDERAL = "organization_federal"
ORGANIZATION_ELECTION = "organization_election"
ORGANIZATION_CONTACT = "organization_contact"
- TYPE_OF_WORK = "type_of_work"
+ ABOUT_YOUR_ORGANIZATION = "about_your_organization"
AUTHORIZING_OFFICIAL = "authorizing_official"
CURRENT_SITES = "current_sites"
DOTGOV_DOMAIN = "dotgov_domain"
@@ -77,7 +77,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
Step.ORGANIZATION_FEDERAL: _("Federal government branch"),
Step.ORGANIZATION_ELECTION: _("Election office"),
Step.ORGANIZATION_CONTACT: _("Organization name and mailing address"),
- Step.TYPE_OF_WORK: _("Type of work"),
+ Step.ABOUT_YOUR_ORGANIZATION: _("About your organization"),
Step.AUTHORIZING_OFFICIAL: _("Authorizing official"),
Step.CURRENT_SITES: _("Current website for your organization"),
Step.DOTGOV_DOMAIN: _(".gov domain"),
@@ -100,7 +100,9 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
Step.ORGANIZATION_ELECTION: lambda w: w.from_model(
"show_organization_election", False
),
- Step.TYPE_OF_WORK: lambda w: w.from_model("show_type_of_work", False),
+ Step.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model(
+ "show_about_your_organization", False
+ ),
Step.NO_OTHER_CONTACTS: lambda w: w.from_model(
"show_no_other_contacts_rationale", False
),
@@ -373,9 +375,9 @@ class OrganizationContact(ApplicationWizard):
forms = [forms.OrganizationContactForm]
-class TypeOfWork(ApplicationWizard):
- template_name = "application_type_of_work.html"
- forms = [forms.TypeOfWorkForm]
+class AboutYourOrganization(ApplicationWizard):
+ template_name = "application_about_your_organization.html"
+ forms = [forms.AboutYourOrganizationForm]
class AuthorizingOfficial(ApplicationWizard):