diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 5fbdf6a3c..7c03b3924 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -555,7 +555,7 @@ class ApplicationWizard(LoginRequiredMixin, NamedUrlSessionWizardView): return None else: # they have answered this question - if organization_type == DomainApplication.FEDERAL: + if organization_type == DomainApplication.OrganizationChoices.FEDERAL: return True return False diff --git a/src/registrar/migrations/0004_domainapplication_federal_agency.py b/src/registrar/migrations/0004_domainapplication_federal_agency.py new file mode 100644 index 000000000..36a071228 --- /dev/null +++ b/src/registrar/migrations/0004_domainapplication_federal_agency.py @@ -0,0 +1,21 @@ +# Generated by Django 4.1.3 on 2022-12-07 15:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ( + "registrar", + "0003_rename_is_election_office_domainapplication_is_election_board_and_more", + ), + ] + + operations = [ + migrations.AddField( + model_name="domainapplication", + name="federal_agency", + field=models.TextField(help_text="Top level federal agency", null=True), + ), + ] diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_application.py index 236403cdb..529710007 100644 --- a/src/registrar/models/domain_application.py +++ b/src/registrar/models/domain_application.py @@ -138,6 +138,10 @@ class DomainApplication(TimeStampedModel): help_text="Type of Organization", ) + federal_agency = models.TextField( + null=True, blank=False, help_text="Top level federal agency" + ) + federal_type = models.CharField( max_length=50, choices=BranchChoices.choices, diff --git a/src/registrar/templates/application_org_contact.html b/src/registrar/templates/application_org_contact.html index ad86240fe..3d105ac50 100644 --- a/src/registrar/templates/application_org_contact.html +++ b/src/registrar/templates/application_org_contact.html @@ -34,8 +34,8 @@ {{ wizard.form.address_line1|add_class:"usa-input" }} {{ wizard.form.address_line2|add_label_class:"usa-label" }} {{ wizard.form.address_line2|add_class:"usa-input" }} - {{ wizard.form.us_state|add_label_class:"usa-label" }} - {{ wizard.form.us_state|add_class:"usa-select" }} + {{ wizard.form.state_territory|add_label_class:"usa-label" }} + {{ wizard.form.state_territory|add_class:"usa-select" }} {{ wizard.form.zipcode|add_label_class:"usa-label" }} {{ wizard.form.zipcode|add_class:"usa-input usa-input--small" }} diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index 0f44a5bb0..88b5a8686 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -519,7 +519,7 @@ class DomainApplicationTests(TestWithUser, WebTest): # continuing on in the flow we need to see top-level agency on the # contact page - federal_page.form["organization_federal-federal_type"] = "Executive" + federal_page.form["organization_federal-federal_type"] = "executive" self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id) federal_result = federal_page.form.submit() # the post request should return a redirect to the contact @@ -577,7 +577,6 @@ class DomainApplicationTests(TestWithUser, WebTest): contact_page = election_result.follow() self.assertNotContains(contact_page, "Top level federal agency") - @skip("WIP") def test_application_edit_restore(self): """