We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build Domain Submission Landing Page
**User Story**

As a user submitting a domain request I want to know my domain was successfully submitted so I can prepare for future steps

**Acceptance Criteria**

- Domain Request form has a landing page that aligns with wireframes

**Wireframe**

https://www.figma.com/proto/ninNjo0bTg7XfB4mvTp4hG/GetGov%2FWireframes?page-id=1057%3A4846&node-id=1077%3A7610&viewport=-1004%2C292%2C0.15&scaling=min-zoom&starting-point-node-id=1057%3A5291

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/registrar/forms/application_wizard.py`
Content:
```
1 """Forms Wizard for creating a new domain application."""
2 
3 import logging
4 
5 from django import forms
6 from django.shortcuts import redirect
7 
8 from django.contrib.auth.mixins import LoginRequiredMixin
9 
10 from formtools.wizard.views import NamedUrlSessionWizardView  # type: ignore
11 
12 from registrar.models import DomainApplication, Website
13 
14 
15 logger = logging.getLogger(__name__)
16 
17 
18 # Subclass used to remove the default colon suffix from all fields
19 class RegistrarForm(forms.Form):
20     def __init__(self, *args, **kwargs):
21         kwargs.setdefault("label_suffix", "")
22         super(RegistrarForm, self).__init__(*args, **kwargs)
23 
24 
25 class OrganizationTypeForm(RegistrarForm):
26     organization_type = forms.ChoiceField(
27         required=True,
28         choices=[
29             ("Federal", "Federal: a federal agency"),
30             ("Interstate", "Interstate: an organization of two or more states"),
31             (
32                 "State_or_Territory",
33                 (
34                     "State or Territory: One of the 50 U.S. states, the District of "
35                     "Columbia, American Samoa, Guam, Northern Mariana Islands, "
36                     "Puerto Rico, or the U.S. Virgin Islands"
37                 ),
38             ),
39             (
40                 "Tribal",
41                 (
42                     "Tribal: a tribal government recognized by the federal or "
43                     "state government"
44                 ),
45             ),
46             ("County", "County: a county, parish, or borough"),
47             ("City", "City: a city, town, township, village, etc."),
48             (
49                 "Special_District",
50                 "Special District: an independent organization within a single state",
51             ),
52         ],
53         widget=forms.RadioSelect,
54     )
55     federal_type = forms.ChoiceField(
56         required=False,
57         choices=DomainApplication.BRANCH_CHOICES,
58         widget=forms.RadioSelect,
59     )
60     is_election_board = forms.ChoiceField(
61         required=False,
62         choices=[
63             ("Yes", "Yes"),
64             ("No", "No"),
65         ],
66         widget=forms.RadioSelect(attrs={"class": "usa-radio__input"}),
67     )
68 
69 
70 class OrganizationFederalForm(RegistrarForm):
71     federal_type = forms.ChoiceField(
72         required=False,
73         choices=DomainApplication.BRANCH_CHOICES,
74         widget=forms.RadioSelect,
75     )
76 
77 
78 class OrganizationElectionForm(RegistrarForm):
79     is_election_board = forms.BooleanField(
80         widget=forms.RadioSelect(
81             choices=[
82                 (True, "Yes"),
83                 (False, "No"),
84             ],
85         )
86     )
87 
88 
89 class OrganizationContactForm(RegistrarForm):
90     organization_name = forms.CharField(label="Organization Name")
91     address_line1 = forms.CharField(label="Address line 1")
92     address_line2 = forms.CharField(
93         required=False,
94         label="Address line 2",
95     )
96     us_state = forms.ChoiceField(
97         label="State",
98         choices=[
99             ("AL", "Alabama"),
100             ("AK", "Alaska"),
101             ("AZ", "Arizona"),
102             ("AR", "Arkansas"),
103             ("CA", "California"),
104             ("CO", "Colorado"),
105             ("CT", "Connecticut"),
106             ("DE", "Delaware"),
107             ("DC", "District of Columbia"),
108             ("FL", "Florida"),
109             ("GA", "Georgia"),
110             ("HI", "Hawaii"),
111             ("ID", "Idaho"),
112             ("IL", "Illinois"),
113             ("IN", "Indiana"),
114             ("IA", "Iowa"),
115             ("KS", "Kansas"),
116             ("KY", "Kentucky"),
117             ("LA", "Louisiana"),
118             ("ME", "Maine"),
119             ("MD", "Maryland"),
120             ("MA", "Massachusetts"),
121             ("MI", "Michigan"),
122             ("MN", "Minnesota"),
123             ("MS", "Mississippi"),
124             ("MO", "Missouri"),
125             ("MT", "Montana"),
126             ("NE", "Nebraska"),
127             ("NV", "Nevada"),
128             ("NH", "New Hampshire"),
129             ("NJ", "New Jersey"),
130             ("NM", "New Mexico"),
131             ("NY", "New York"),
132             ("NC", "North Carolina"),
133             ("ND", "North Dakota"),
134             ("OH", "Ohio"),
135             ("OK", "Oklahoma"),
136             ("OR", "Oregon"),
137             ("PA", "Pennsylvania"),
138             ("RI", "Rhode Island"),
139             ("SC", "South Carolina"),
140             ("SD", "South Dakota"),
141             ("TN", "Tennessee"),
142             ("TX", "Texas"),
143             ("UT", "Utah"),
144             ("VT", "Vermont"),
145             ("VA", "Virginia"),
146             ("WA", "Washington"),
147             ("WV", "West Virginia"),
148             ("WI", "Wisconsin"),
149             ("WY", "Wyoming"),
150             ("AS", "American Samoa"),
151             ("GU", "Guam"),
152             ("MP", "Northern Mariana Islands"),
153             ("PR", "Puerto Rico"),
154             ("VI", "Virgin Islands"),
155         ],
156     )
157     zipcode = forms.CharField(label="ZIP code")
158 
159 
160 class AuthorizingOfficialForm(RegistrarForm):
161     first_name = forms.CharField(label="First name/given name")
162     middle_name = forms.CharField(
163         required=False,
164         label="Middle name (optional)",
165     )
166     last_name = forms.CharField(label="Last name/family name")
167     title = forms.CharField(label="Title or role in your organization")
168     email = forms.EmailField(label="Email")
169     phone = forms.CharField(label="Phone")
170 
171 
172 class CurrentSitesForm(RegistrarForm):
173     current_site = forms.CharField(
174         required=False,
175         label="Enter your organization’s public website, if you have one. For example, "
176         "www.city.com.",
177     )
178 
179 
180 class DotGovDomainForm(RegistrarForm):
181     dotgov_domain = forms.CharField(label="What .gov domain do you want?")
182     alternative_domain = forms.CharField(
183         required=False,
184         label="Are there other domains you’d like if we can’t give you your first "
185         "choice? Entering alternative domains is optional.",
186     )
187 
188 
189 class PurposeForm(RegistrarForm):
190     purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea())
191 
192 
193 class YourContactForm(RegistrarForm):
194     first_name = forms.CharField(label="First name/given name")
195     middle_name = forms.CharField(
196         required=False,
197         label="Middle name (optional)",
198     )
199     last_name = forms.CharField(label="Last name/family name")
200     title = forms.CharField(label="Title or role in your organization")
201     email = forms.EmailField(label="Email")
202     phone = forms.CharField(label="Phone")
203 
204 
205 class OtherContactsForm(RegistrarForm):
206     first_name = forms.CharField(label="First name/given name")
207     middle_name = forms.CharField(
208         required=False,
209         label="Middle name (optional)",
210     )
211     last_name = forms.CharField(label="Last name/family name")
212     title = forms.CharField(label="Title or role in your organization")
213     email = forms.EmailField(label="Email")
214     phone = forms.CharField(label="Phone")
215 
216 
217 class SecurityEmailForm(RegistrarForm):
218     email = forms.EmailField(
219         required=False,
220         label="Security email",
221     )
222 
223 
224 class AnythingElseForm(RegistrarForm):
225     anything_else = forms.CharField(
226         required=False, label="Anything else we should know", widget=forms.Textarea()
227     )
228 
229 
230 class RequirementsForm(RegistrarForm):
231     agree_check = forms.BooleanField(
232         label="I read and agree to the .gov domain requirements."
233     )
234 
235 
236 # Empty class for the review page which gets included as part of the form, but does not
237 # have any form fields itself
238 class ReviewForm(RegistrarForm):
239     pass
240 
241 
242 # List of forms in our wizard. Each entry is a tuple of a name and a form
243 # subclass
244 FORMS = [
245     ("organization_type", OrganizationTypeForm),
246     ("organization_federal", OrganizationFederalForm),
247     ("organization_election", OrganizationElectionForm),
248     ("organization_contact", OrganizationContactForm),
249     ("authorizing_official", AuthorizingOfficialForm),
250     ("current_sites", CurrentSitesForm),
251     ("dotgov_domain", DotGovDomainForm),
252     ("purpose", PurposeForm),
253     ("your_contact", YourContactForm),
254     ("other_contacts", OtherContactsForm),
255     ("security_email", SecurityEmailForm),
256     ("anything_else", AnythingElseForm),
257     ("requirements", RequirementsForm),
258     ("review", ReviewForm),
259 ]
260 
261 # Dict to match up the right template with the right step. Keys here must
262 # match the first elements of the tuples in FORMS
263 TEMPLATES = {
264     "organization_type": "application_org_type.html",
265     "organization_federal": "application_org_federal.html",
266     "organization_election": "application_org_election.html",
267     "organization_contact": "application_org_contact.html",
268     "authorizing_official": "application_authorizing_official.html",
269     "current_sites": "application_current_sites.html",
270     "dotgov_domain": "application_dotgov_domain.html",
271     "purpose": "application_purpose.html",
272     "your_contact": "application_your_contact.html",
273     "other_contacts": "application_other_contacts.html",
274     "security_email": "application_security_email.html",
275     "anything_else": "application_anything_else.html",
276     "requirements": "application_requirements.html",
277     "review": "application_review.html",
278 }
279 
280 # We need to pass our page titles as context to the templates, indexed
281 # by the step names
282 TITLES = {
283     "organization_type": "Type of organization",
284     "organization_federal": "Type of organization — Federal",
285     "organization_election": "Type of organization — Election board",
286     "organization_contact": "Organization name and mailing address",
287     "authorizing_official": "Authorizing official",
288     "current_sites": "Organization website",
289     "dotgov_domain": ".gov domain",
290     "purpose": "Purpose of your domain",
291     "your_contact": "Your contact information",
292     "other_contacts": "Other contacts for your domain",
293     "security_email": "Security email for public use",
294     "anything_else": "Anything else we should know?",
295     "requirements": "Requirements for registration and operation of .gov domains",
296     "review": "Review and submit your domain request",
297 }
298 
299 
300 class ApplicationWizard(LoginRequiredMixin, NamedUrlSessionWizardView):
301 
302     """Multi-page form ("wizard") for new domain applications.
303 
304     This sets up a sequence of forms that gather information for new
305     domain applications. Each form in the sequence has its own URL and
306     the progress through the form is stored in the Django session (thus
307     "NamedUrlSessionWizardView").
308     """
309 
310     form_list = FORMS
311 
312     def get_template_names(self):
313         """Template for the current step.
314 
315         The return is a singleton list.
316         """
317         return [TEMPLATES[self.steps.current]]
318 
319     def get_context_data(self, form, **kwargs):
320         """Add title information to the context for all steps."""
321         context = super().get_context_data(form=form, **kwargs)
322         context["form_titles"] = TITLES
323         return context
324 
325     def forms_to_object(self, form_dict: dict) -> DomainApplication:
326         """Unpack the form responses onto the model object properties."""
327         application = DomainApplication.objects.create(creator=self.request.user)
328 
329         # organization type information
330         organization_type_data = form_dict["organization_type"].cleaned_data
331         application.organization_type = organization_type_data["organization_type"]
332 
333         # federal branch information
334         federal_branch_data = form_dict["organization_federal"].cleaned_data
335         application.federal_branch = federal_branch_data["federal_type"]
336 
337         # election board  information
338         election_board_data = form_dict["organization_election"].cleaned_data
339         application.is_election_office = election_board_data["is_election_board"]
340 
341         # contact information
342         contact_data = form_dict["organization_contact"].cleaned_data
343         application.organization_name = contact_data["organization_name"]
344         application.street_address = contact_data["address_line1"]
345         # TODO: add the rest of these fields when they are created in the forms
346 
347         # This isn't really the requested_domain field
348         # but we need something in this field to make the form submittable
349         requested_site, _ = Website.objects.get_or_create(
350             website=contact_data["organization_name"] + ".gov"
351         )
352         application.requested_domain = requested_site
353         return application
354 
355     def done(self, form_list, form_dict, **kwargs):
356         application = self.forms_to_object(form_dict)
357         application.submit()  # change the status to submitted
358         application.save()
359         logger.debug("Application object saved: %s", application.id)
360         return redirect("home")
361
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -3,7 +3,7 @@
 import logging
 
 from django import forms
-from django.shortcuts import redirect
+from django.shortcuts import render
 
 from django.contrib.auth.mixins import LoginRequiredMixin
 
@@ -357,4 +357,6 @@
         application.submit()  # change the status to submitted
         application.save()
         logger.debug("Application object saved: %s", application.id)
-        return redirect("home")
+        return render(
+            self.request, "application_done.html", {"application_id": application.id}
+        )

{"golden_diff": "diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py\n--- a/src/registrar/forms/application_wizard.py\n+++ b/src/registrar/forms/application_wizard.py\n@@ -3,7 +3,7 @@\n import logging\n \n from django import forms\n-from django.shortcuts import redirect\n+from django.shortcuts import render\n \n from django.contrib.auth.mixins import LoginRequiredMixin\n \n@@ -357,4 +357,6 @@\n         application.submit()  # change the status to submitted\n         application.save()\n         logger.debug(\"Application object saved: %s\", application.id)\n-        return redirect(\"home\")\n+        return render(\n+            self.request, \"application_done.html\", {\"application_id\": application.id}\n+        )\n", "issue": "Build Domain Submission Landing Page\n**User Story**\n\nAs a user submitting a domain request I want to know my domain was successfully submitted so I can prepare for future steps\n\n**Acceptance Criteria**\n\n- Domain Request form has a landing page that aligns with wireframes\n\n**Wireframe**\n\nhttps://www.figma.com/proto/ninNjo0bTg7XfB4mvTp4hG/GetGov%2FWireframes?page-id=1057%3A4846&node-id=1077%3A7610&viewport=-1004%2C292%2C0.15&scaling=min-zoom&starting-point-node-id=1057%3A5291\n", "before_files": [{"content": "\"\"\"Forms Wizard for creating a new domain application.\"\"\"\n\nimport logging\n\nfrom django import forms\nfrom django.shortcuts import redirect\n\nfrom django.contrib.auth.mixins import LoginRequiredMixin\n\nfrom formtools.wizard.views import NamedUrlSessionWizardView  # type: ignore\n\nfrom registrar.models import DomainApplication, Website\n\n\nlogger = logging.getLogger(__name__)\n\n\n# Subclass used to remove the default colon suffix from all fields\nclass RegistrarForm(forms.Form):\n    def __init__(self, *args, **kwargs):\n        kwargs.setdefault(\"label_suffix\", \"\")\n        super(RegistrarForm, self).__init__(*args, **kwargs)\n\n\nclass OrganizationTypeForm(RegistrarForm):\n    organization_type = forms.ChoiceField(\n        required=True,\n        choices=[\n            (\"Federal\", \"Federal: a federal agency\"),\n            (\"Interstate\", \"Interstate: an organization of two or more states\"),\n            (\n                \"State_or_Territory\",\n                (\n                    \"State or Territory: One of the 50 U.S. states, the District of \"\n                    \"Columbia, American Samoa, Guam, Northern Mariana Islands, \"\n                    \"Puerto Rico, or the U.S. Virgin Islands\"\n                ),\n            ),\n            (\n                \"Tribal\",\n                (\n                    \"Tribal: a tribal government recognized by the federal or \"\n                    \"state government\"\n                ),\n            ),\n            (\"County\", \"County: a county, parish, or borough\"),\n            (\"City\", \"City: a city, town, township, village, etc.\"),\n            (\n                \"Special_District\",\n                \"Special District: an independent organization within a single state\",\n            ),\n        ],\n        widget=forms.RadioSelect,\n    )\n    federal_type = forms.ChoiceField(\n        required=False,\n        choices=DomainApplication.BRANCH_CHOICES,\n        widget=forms.RadioSelect,\n    )\n    is_election_board = forms.ChoiceField(\n        required=False,\n        choices=[\n            (\"Yes\", \"Yes\"),\n            (\"No\", \"No\"),\n        ],\n        widget=forms.RadioSelect(attrs={\"class\": \"usa-radio__input\"}),\n    )\n\n\nclass OrganizationFederalForm(RegistrarForm):\n    federal_type = forms.ChoiceField(\n        required=False,\n        choices=DomainApplication.BRANCH_CHOICES,\n        widget=forms.RadioSelect,\n    )\n\n\nclass OrganizationElectionForm(RegistrarForm):\n    is_election_board = forms.BooleanField(\n        widget=forms.RadioSelect(\n            choices=[\n                (True, \"Yes\"),\n                (False, \"No\"),\n            ],\n        )\n    )\n\n\nclass OrganizationContactForm(RegistrarForm):\n    organization_name = forms.CharField(label=\"Organization Name\")\n    address_line1 = forms.CharField(label=\"Address line 1\")\n    address_line2 = forms.CharField(\n        required=False,\n        label=\"Address line 2\",\n    )\n    us_state = forms.ChoiceField(\n        label=\"State\",\n        choices=[\n            (\"AL\", \"Alabama\"),\n            (\"AK\", \"Alaska\"),\n            (\"AZ\", \"Arizona\"),\n            (\"AR\", \"Arkansas\"),\n            (\"CA\", \"California\"),\n            (\"CO\", \"Colorado\"),\n            (\"CT\", \"Connecticut\"),\n            (\"DE\", \"Delaware\"),\n            (\"DC\", \"District of Columbia\"),\n            (\"FL\", \"Florida\"),\n            (\"GA\", \"Georgia\"),\n            (\"HI\", \"Hawaii\"),\n            (\"ID\", \"Idaho\"),\n            (\"IL\", \"Illinois\"),\n            (\"IN\", \"Indiana\"),\n            (\"IA\", \"Iowa\"),\n            (\"KS\", \"Kansas\"),\n            (\"KY\", \"Kentucky\"),\n            (\"LA\", \"Louisiana\"),\n            (\"ME\", \"Maine\"),\n            (\"MD\", \"Maryland\"),\n            (\"MA\", \"Massachusetts\"),\n            (\"MI\", \"Michigan\"),\n            (\"MN\", \"Minnesota\"),\n            (\"MS\", \"Mississippi\"),\n            (\"MO\", \"Missouri\"),\n            (\"MT\", \"Montana\"),\n            (\"NE\", \"Nebraska\"),\n            (\"NV\", \"Nevada\"),\n            (\"NH\", \"New Hampshire\"),\n            (\"NJ\", \"New Jersey\"),\n            (\"NM\", \"New Mexico\"),\n            (\"NY\", \"New York\"),\n            (\"NC\", \"North Carolina\"),\n            (\"ND\", \"North Dakota\"),\n            (\"OH\", \"Ohio\"),\n            (\"OK\", \"Oklahoma\"),\n            (\"OR\", \"Oregon\"),\n            (\"PA\", \"Pennsylvania\"),\n            (\"RI\", \"Rhode Island\"),\n            (\"SC\", \"South Carolina\"),\n            (\"SD\", \"South Dakota\"),\n            (\"TN\", \"Tennessee\"),\n            (\"TX\", \"Texas\"),\n            (\"UT\", \"Utah\"),\n            (\"VT\", \"Vermont\"),\n            (\"VA\", \"Virginia\"),\n            (\"WA\", \"Washington\"),\n            (\"WV\", \"West Virginia\"),\n            (\"WI\", \"Wisconsin\"),\n            (\"WY\", \"Wyoming\"),\n            (\"AS\", \"American Samoa\"),\n            (\"GU\", \"Guam\"),\n            (\"MP\", \"Northern Mariana Islands\"),\n            (\"PR\", \"Puerto Rico\"),\n            (\"VI\", \"Virgin Islands\"),\n        ],\n    )\n    zipcode = forms.CharField(label=\"ZIP code\")\n\n\nclass AuthorizingOfficialForm(RegistrarForm):\n    first_name = forms.CharField(label=\"First name/given name\")\n    middle_name = forms.CharField(\n        required=False,\n        label=\"Middle name (optional)\",\n    )\n    last_name = forms.CharField(label=\"Last name/family name\")\n    title = forms.CharField(label=\"Title or role in your organization\")\n    email = forms.EmailField(label=\"Email\")\n    phone = forms.CharField(label=\"Phone\")\n\n\nclass CurrentSitesForm(RegistrarForm):\n    current_site = forms.CharField(\n        required=False,\n        label=\"Enter your organization\u2019s public website, if you have one. For example, \"\n        \"www.city.com.\",\n    )\n\n\nclass DotGovDomainForm(RegistrarForm):\n    dotgov_domain = forms.CharField(label=\"What .gov domain do you want?\")\n    alternative_domain = forms.CharField(\n        required=False,\n        label=\"Are there other domains you\u2019d like if we can\u2019t give you your first \"\n        \"choice? Entering alternative domains is optional.\",\n    )\n\n\nclass PurposeForm(RegistrarForm):\n    purpose_field = forms.CharField(label=\"Purpose\", widget=forms.Textarea())\n\n\nclass YourContactForm(RegistrarForm):\n    first_name = forms.CharField(label=\"First name/given name\")\n    middle_name = forms.CharField(\n        required=False,\n        label=\"Middle name (optional)\",\n    )\n    last_name = forms.CharField(label=\"Last name/family name\")\n    title = forms.CharField(label=\"Title or role in your organization\")\n    email = forms.EmailField(label=\"Email\")\n    phone = forms.CharField(label=\"Phone\")\n\n\nclass OtherContactsForm(RegistrarForm):\n    first_name = forms.CharField(label=\"First name/given name\")\n    middle_name = forms.CharField(\n        required=False,\n        label=\"Middle name (optional)\",\n    )\n    last_name = forms.CharField(label=\"Last name/family name\")\n    title = forms.CharField(label=\"Title or role in your organization\")\n    email = forms.EmailField(label=\"Email\")\n    phone = forms.CharField(label=\"Phone\")\n\n\nclass SecurityEmailForm(RegistrarForm):\n    email = forms.EmailField(\n        required=False,\n        label=\"Security email\",\n    )\n\n\nclass AnythingElseForm(RegistrarForm):\n    anything_else = forms.CharField(\n        required=False, label=\"Anything else we should know\", widget=forms.Textarea()\n    )\n\n\nclass RequirementsForm(RegistrarForm):\n    agree_check = forms.BooleanField(\n        label=\"I read and agree to the .gov domain requirements.\"\n    )\n\n\n# Empty class for the review page which gets included as part of the form, but does not\n# have any form fields itself\nclass ReviewForm(RegistrarForm):\n    pass\n\n\n# List of forms in our wizard. Each entry is a tuple of a name and a form\n# subclass\nFORMS = [\n    (\"organization_type\", OrganizationTypeForm),\n    (\"organization_federal\", OrganizationFederalForm),\n    (\"organization_election\", OrganizationElectionForm),\n    (\"organization_contact\", OrganizationContactForm),\n    (\"authorizing_official\", AuthorizingOfficialForm),\n    (\"current_sites\", CurrentSitesForm),\n    (\"dotgov_domain\", DotGovDomainForm),\n    (\"purpose\", PurposeForm),\n    (\"your_contact\", YourContactForm),\n    (\"other_contacts\", OtherContactsForm),\n    (\"security_email\", SecurityEmailForm),\n    (\"anything_else\", AnythingElseForm),\n    (\"requirements\", RequirementsForm),\n    (\"review\", ReviewForm),\n]\n\n# Dict to match up the right template with the right step. Keys here must\n# match the first elements of the tuples in FORMS\nTEMPLATES = {\n    \"organization_type\": \"application_org_type.html\",\n    \"organization_federal\": \"application_org_federal.html\",\n    \"organization_election\": \"application_org_election.html\",\n    \"organization_contact\": \"application_org_contact.html\",\n    \"authorizing_official\": \"application_authorizing_official.html\",\n    \"current_sites\": \"application_current_sites.html\",\n    \"dotgov_domain\": \"application_dotgov_domain.html\",\n    \"purpose\": \"application_purpose.html\",\n    \"your_contact\": \"application_your_contact.html\",\n    \"other_contacts\": \"application_other_contacts.html\",\n    \"security_email\": \"application_security_email.html\",\n    \"anything_else\": \"application_anything_else.html\",\n    \"requirements\": \"application_requirements.html\",\n    \"review\": \"application_review.html\",\n}\n\n# We need to pass our page titles as context to the templates, indexed\n# by the step names\nTITLES = {\n    \"organization_type\": \"Type of organization\",\n    \"organization_federal\": \"Type of organization \u2014 Federal\",\n    \"organization_election\": \"Type of organization \u2014 Election board\",\n    \"organization_contact\": \"Organization name and mailing address\",\n    \"authorizing_official\": \"Authorizing official\",\n    \"current_sites\": \"Organization website\",\n    \"dotgov_domain\": \".gov domain\",\n    \"purpose\": \"Purpose of your domain\",\n    \"your_contact\": \"Your contact information\",\n    \"other_contacts\": \"Other contacts for your domain\",\n    \"security_email\": \"Security email for public use\",\n    \"anything_else\": \"Anything else we should know?\",\n    \"requirements\": \"Requirements for registration and operation of .gov domains\",\n    \"review\": \"Review and submit your domain request\",\n}\n\n\nclass ApplicationWizard(LoginRequiredMixin, NamedUrlSessionWizardView):\n\n    \"\"\"Multi-page form (\"wizard\") for new domain applications.\n\n    This sets up a sequence of forms that gather information for new\n    domain applications. Each form in the sequence has its own URL and\n    the progress through the form is stored in the Django session (thus\n    \"NamedUrlSessionWizardView\").\n    \"\"\"\n\n    form_list = FORMS\n\n    def get_template_names(self):\n        \"\"\"Template for the current step.\n\n        The return is a singleton list.\n        \"\"\"\n        return [TEMPLATES[self.steps.current]]\n\n    def get_context_data(self, form, **kwargs):\n        \"\"\"Add title information to the context for all steps.\"\"\"\n        context = super().get_context_data(form=form, **kwargs)\n        context[\"form_titles\"] = TITLES\n        return context\n\n    def forms_to_object(self, form_dict: dict) -> DomainApplication:\n        \"\"\"Unpack the form responses onto the model object properties.\"\"\"\n        application = DomainApplication.objects.create(creator=self.request.user)\n\n        # organization type information\n        organization_type_data = form_dict[\"organization_type\"].cleaned_data\n        application.organization_type = organization_type_data[\"organization_type\"]\n\n        # federal branch information\n        federal_branch_data = form_dict[\"organization_federal\"].cleaned_data\n        application.federal_branch = federal_branch_data[\"federal_type\"]\n\n        # election board  information\n        election_board_data = form_dict[\"organization_election\"].cleaned_data\n        application.is_election_office = election_board_data[\"is_election_board\"]\n\n        # contact information\n        contact_data = form_dict[\"organization_contact\"].cleaned_data\n        application.organization_name = contact_data[\"organization_name\"]\n        application.street_address = contact_data[\"address_line1\"]\n        # TODO: add the rest of these fields when they are created in the forms\n\n        # This isn't really the requested_domain field\n        # but we need something in this field to make the form submittable\n        requested_site, _ = Website.objects.get_or_create(\n            website=contact_data[\"organization_name\"] + \".gov\"\n        )\n        application.requested_domain = requested_site\n        return application\n\n    def done(self, form_list, form_dict, **kwargs):\n        application = self.forms_to_object(form_dict)\n        application.submit()  # change the status to submitted\n        application.save()\n        logger.debug(\"Application object saved: %s\", application.id)\n        return redirect(\"home\")\n", "path": "src/registrar/forms/application_wizard.py"}], "after_files": [{"content": "\"\"\"Forms Wizard for creating a new domain application.\"\"\"\n\nimport logging\n\nfrom django import forms\nfrom django.shortcuts import render\n\nfrom django.contrib.auth.mixins import LoginRequiredMixin\n\nfrom formtools.wizard.views import NamedUrlSessionWizardView  # type: ignore\n\nfrom registrar.models import DomainApplication, Website\n\n\nlogger = logging.getLogger(__name__)\n\n\n# Subclass used to remove the default colon suffix from all fields\nclass RegistrarForm(forms.Form):\n    def __init__(self, *args, **kwargs):\n        kwargs.setdefault(\"label_suffix\", \"\")\n        super(RegistrarForm, self).__init__(*args, **kwargs)\n\n\nclass OrganizationTypeForm(RegistrarForm):\n    organization_type = forms.ChoiceField(\n        required=True,\n        choices=[\n            (\"Federal\", \"Federal: a federal agency\"),\n            (\"Interstate\", \"Interstate: an organization of two or more states\"),\n            (\n                \"State_or_Territory\",\n                (\n                    \"State or Territory: One of the 50 U.S. states, the District of \"\n                    \"Columbia, American Samoa, Guam, Northern Mariana Islands, \"\n                    \"Puerto Rico, or the U.S. Virgin Islands\"\n                ),\n            ),\n            (\n                \"Tribal\",\n                (\n                    \"Tribal: a tribal government recognized by the federal or \"\n                    \"state government\"\n                ),\n            ),\n            (\"County\", \"County: a county, parish, or borough\"),\n            (\"City\", \"City: a city, town, township, village, etc.\"),\n            (\n                \"Special_District\",\n                \"Special District: an independent organization within a single state\",\n            ),\n        ],\n        widget=forms.RadioSelect,\n    )\n    federal_type = forms.ChoiceField(\n        required=False,\n        choices=DomainApplication.BRANCH_CHOICES,\n        widget=forms.RadioSelect,\n    )\n    is_election_board = forms.ChoiceField(\n        required=False,\n        choices=[\n            (\"Yes\", \"Yes\"),\n            (\"No\", \"No\"),\n        ],\n        widget=forms.RadioSelect(attrs={\"class\": \"usa-radio__input\"}),\n    )\n\n\nclass OrganizationFederalForm(RegistrarForm):\n    federal_type = forms.ChoiceField(\n        required=False,\n        choices=DomainApplication.BRANCH_CHOICES,\n        widget=forms.RadioSelect,\n    )\n\n\nclass OrganizationElectionForm(RegistrarForm):\n    is_election_board = forms.BooleanField(\n        widget=forms.RadioSelect(\n            choices=[\n                (True, \"Yes\"),\n                (False, \"No\"),\n            ],\n        )\n    )\n\n\nclass OrganizationContactForm(RegistrarForm):\n    organization_name = forms.CharField(label=\"Organization Name\")\n    address_line1 = forms.CharField(label=\"Address line 1\")\n    address_line2 = forms.CharField(\n        required=False,\n        label=\"Address line 2\",\n    )\n    us_state = forms.ChoiceField(\n        label=\"State\",\n        choices=[\n            (\"AL\", \"Alabama\"),\n            (\"AK\", \"Alaska\"),\n            (\"AZ\", \"Arizona\"),\n            (\"AR\", \"Arkansas\"),\n            (\"CA\", \"California\"),\n            (\"CO\", \"Colorado\"),\n            (\"CT\", \"Connecticut\"),\n            (\"DE\", \"Delaware\"),\n            (\"DC\", \"District of Columbia\"),\n            (\"FL\", \"Florida\"),\n            (\"GA\", \"Georgia\"),\n            (\"HI\", \"Hawaii\"),\n            (\"ID\", \"Idaho\"),\n            (\"IL\", \"Illinois\"),\n            (\"IN\", \"Indiana\"),\n            (\"IA\", \"Iowa\"),\n            (\"KS\", \"Kansas\"),\n            (\"KY\", \"Kentucky\"),\n            (\"LA\", \"Louisiana\"),\n            (\"ME\", \"Maine\"),\n            (\"MD\", \"Maryland\"),\n            (\"MA\", \"Massachusetts\"),\n            (\"MI\", \"Michigan\"),\n            (\"MN\", \"Minnesota\"),\n            (\"MS\", \"Mississippi\"),\n            (\"MO\", \"Missouri\"),\n            (\"MT\", \"Montana\"),\n            (\"NE\", \"Nebraska\"),\n            (\"NV\", \"Nevada\"),\n            (\"NH\", \"New Hampshire\"),\n            (\"NJ\", \"New Jersey\"),\n            (\"NM\", \"New Mexico\"),\n            (\"NY\", \"New York\"),\n            (\"NC\", \"North Carolina\"),\n            (\"ND\", \"North Dakota\"),\n            (\"OH\", \"Ohio\"),\n            (\"OK\", \"Oklahoma\"),\n            (\"OR\", \"Oregon\"),\n            (\"PA\", \"Pennsylvania\"),\n            (\"RI\", \"Rhode Island\"),\n            (\"SC\", \"South Carolina\"),\n            (\"SD\", \"South Dakota\"),\n            (\"TN\", \"Tennessee\"),\n            (\"TX\", \"Texas\"),\n            (\"UT\", \"Utah\"),\n            (\"VT\", \"Vermont\"),\n            (\"VA\", \"Virginia\"),\n            (\"WA\", \"Washington\"),\n            (\"WV\", \"West Virginia\"),\n            (\"WI\", \"Wisconsin\"),\n            (\"WY\", \"Wyoming\"),\n            (\"AS\", \"American Samoa\"),\n            (\"GU\", \"Guam\"),\n            (\"MP\", \"Northern Mariana Islands\"),\n            (\"PR\", \"Puerto Rico\"),\n            (\"VI\", \"Virgin Islands\"),\n        ],\n    )\n    zipcode = forms.CharField(label=\"ZIP code\")\n\n\nclass AuthorizingOfficialForm(RegistrarForm):\n    first_name = forms.CharField(label=\"First name/given name\")\n    middle_name = forms.CharField(\n        required=False,\n        label=\"Middle name (optional)\",\n    )\n    last_name = forms.CharField(label=\"Last name/family name\")\n    title = forms.CharField(label=\"Title or role in your organization\")\n    email = forms.EmailField(label=\"Email\")\n    phone = forms.CharField(label=\"Phone\")\n\n\nclass CurrentSitesForm(RegistrarForm):\n    current_site = forms.CharField(\n        required=False,\n        label=\"Enter your organization\u2019s public website, if you have one. For example, \"\n        \"www.city.com.\",\n    )\n\n\nclass DotGovDomainForm(RegistrarForm):\n    dotgov_domain = forms.CharField(label=\"What .gov domain do you want?\")\n    alternative_domain = forms.CharField(\n        required=False,\n        label=\"Are there other domains you\u2019d like if we can\u2019t give you your first \"\n        \"choice? Entering alternative domains is optional.\",\n    )\n\n\nclass PurposeForm(RegistrarForm):\n    purpose_field = forms.CharField(label=\"Purpose\", widget=forms.Textarea())\n\n\nclass YourContactForm(RegistrarForm):\n    first_name = forms.CharField(label=\"First name/given name\")\n    middle_name = forms.CharField(\n        required=False,\n        label=\"Middle name (optional)\",\n    )\n    last_name = forms.CharField(label=\"Last name/family name\")\n    title = forms.CharField(label=\"Title or role in your organization\")\n    email = forms.EmailField(label=\"Email\")\n    phone = forms.CharField(label=\"Phone\")\n\n\nclass OtherContactsForm(RegistrarForm):\n    first_name = forms.CharField(label=\"First name/given name\")\n    middle_name = forms.CharField(\n        required=False,\n        label=\"Middle name (optional)\",\n    )\n    last_name = forms.CharField(label=\"Last name/family name\")\n    title = forms.CharField(label=\"Title or role in your organization\")\n    email = forms.EmailField(label=\"Email\")\n    phone = forms.CharField(label=\"Phone\")\n\n\nclass SecurityEmailForm(RegistrarForm):\n    email = forms.EmailField(\n        required=False,\n        label=\"Security email\",\n    )\n\n\nclass AnythingElseForm(RegistrarForm):\n    anything_else = forms.CharField(\n        required=False, label=\"Anything else we should know\", widget=forms.Textarea()\n    )\n\n\nclass RequirementsForm(RegistrarForm):\n    agree_check = forms.BooleanField(\n        label=\"I read and agree to the .gov domain requirements.\"\n    )\n\n\n# Empty class for the review page which gets included as part of the form, but does not\n# have any form fields itself\nclass ReviewForm(RegistrarForm):\n    pass\n\n\n# List of forms in our wizard. Each entry is a tuple of a name and a form\n# subclass\nFORMS = [\n    (\"organization_type\", OrganizationTypeForm),\n    (\"organization_federal\", OrganizationFederalForm),\n    (\"organization_election\", OrganizationElectionForm),\n    (\"organization_contact\", OrganizationContactForm),\n    (\"authorizing_official\", AuthorizingOfficialForm),\n    (\"current_sites\", CurrentSitesForm),\n    (\"dotgov_domain\", DotGovDomainForm),\n    (\"purpose\", PurposeForm),\n    (\"your_contact\", YourContactForm),\n    (\"other_contacts\", OtherContactsForm),\n    (\"security_email\", SecurityEmailForm),\n    (\"anything_else\", AnythingElseForm),\n    (\"requirements\", RequirementsForm),\n    (\"review\", ReviewForm),\n]\n\n# Dict to match up the right template with the right step. Keys here must\n# match the first elements of the tuples in FORMS\nTEMPLATES = {\n    \"organization_type\": \"application_org_type.html\",\n    \"organization_federal\": \"application_org_federal.html\",\n    \"organization_election\": \"application_org_election.html\",\n    \"organization_contact\": \"application_org_contact.html\",\n    \"authorizing_official\": \"application_authorizing_official.html\",\n    \"current_sites\": \"application_current_sites.html\",\n    \"dotgov_domain\": \"application_dotgov_domain.html\",\n    \"purpose\": \"application_purpose.html\",\n    \"your_contact\": \"application_your_contact.html\",\n    \"other_contacts\": \"application_other_contacts.html\",\n    \"security_email\": \"application_security_email.html\",\n    \"anything_else\": \"application_anything_else.html\",\n    \"requirements\": \"application_requirements.html\",\n    \"review\": \"application_review.html\",\n}\n\n# We need to pass our page titles as context to the templates, indexed\n# by the step names\nTITLES = {\n    \"organization_type\": \"Type of organization\",\n    \"organization_federal\": \"Type of organization \u2014 Federal\",\n    \"organization_election\": \"Type of organization \u2014 Election board\",\n    \"organization_contact\": \"Organization name and mailing address\",\n    \"authorizing_official\": \"Authorizing official\",\n    \"current_sites\": \"Organization website\",\n    \"dotgov_domain\": \".gov domain\",\n    \"purpose\": \"Purpose of your domain\",\n    \"your_contact\": \"Your contact information\",\n    \"other_contacts\": \"Other contacts for your domain\",\n    \"security_email\": \"Security email for public use\",\n    \"anything_else\": \"Anything else we should know?\",\n    \"requirements\": \"Requirements for registration and operation of .gov domains\",\n    \"review\": \"Review and submit your domain request\",\n}\n\n\nclass ApplicationWizard(LoginRequiredMixin, NamedUrlSessionWizardView):\n\n    \"\"\"Multi-page form (\"wizard\") for new domain applications.\n\n    This sets up a sequence of forms that gather information for new\n    domain applications. Each form in the sequence has its own URL and\n    the progress through the form is stored in the Django session (thus\n    \"NamedUrlSessionWizardView\").\n    \"\"\"\n\n    form_list = FORMS\n\n    def get_template_names(self):\n        \"\"\"Template for the current step.\n\n        The return is a singleton list.\n        \"\"\"\n        return [TEMPLATES[self.steps.current]]\n\n    def get_context_data(self, form, **kwargs):\n        \"\"\"Add title information to the context for all steps.\"\"\"\n        context = super().get_context_data(form=form, **kwargs)\n        context[\"form_titles\"] = TITLES\n        return context\n\n    def forms_to_object(self, form_dict: dict) -> DomainApplication:\n        \"\"\"Unpack the form responses onto the model object properties.\"\"\"\n        application = DomainApplication.objects.create(creator=self.request.user)\n\n        # organization type information\n        organization_type_data = form_dict[\"organization_type\"].cleaned_data\n        application.organization_type = organization_type_data[\"organization_type\"]\n\n        # federal branch information\n        federal_branch_data = form_dict[\"organization_federal\"].cleaned_data\n        application.federal_branch = federal_branch_data[\"federal_type\"]\n\n        # election board  information\n        election_board_data = form_dict[\"organization_election\"].cleaned_data\n        application.is_election_office = election_board_data[\"is_election_board\"]\n\n        # contact information\n        contact_data = form_dict[\"organization_contact\"].cleaned_data\n        application.organization_name = contact_data[\"organization_name\"]\n        application.street_address = contact_data[\"address_line1\"]\n        # TODO: add the rest of these fields when they are created in the forms\n\n        # This isn't really the requested_domain field\n        # but we need something in this field to make the form submittable\n        requested_site, _ = Website.objects.get_or_create(\n            website=contact_data[\"organization_name\"] + \".gov\"\n        )\n        application.requested_domain = requested_site\n        return application\n\n    def done(self, form_list, form_dict, **kwargs):\n        application = self.forms_to_object(form_dict)\n        application.submit()  # change the status to submitted\n        application.save()\n        logger.debug(\"Application object saved: %s\", application.id)\n        return render(\n            self.request, \"application_done.html\", {\"application_id\": application.id}\n        )\n", "path": "src/registrar/forms/application_wizard.py"}]}