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]