From fab3e1b292cdd33fd62a32cbb5afc65be44ad250 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 3 Nov 2022 17:00:26 -0400 Subject: [PATCH 01/50] Add purpose view --- src/registrar/forms/application_wizard.py | 10 ++++++ .../templates/application_purpose.html | 34 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 src/registrar/templates/application_purpose.html diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 7c492d56b..2ee7248de 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -65,12 +65,20 @@ class ContactForm(forms.Form): organization_name = forms.CharField(label="Organization Name") street_address = forms.CharField(label="Street address") +class PurposeForm(forms.Form): + purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea( + attrs={ 'class':'usa-textarea usa-character-count__field', + 'id':'with-hint', + 'aria-describedby':'instructions', + 'maxlength':'500', + })) # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass FORMS = [ ("organization", OrganizationForm), ("contact", ContactForm), + ("purpose", PurposeForm), ] # Dict to match up the right template with the right step. Keys here must @@ -78,6 +86,7 @@ FORMS = [ TEMPLATES = { "organization": "application_organization.html", "contact": "application_contact.html", + "purpose": "application_purpose.html", } # We need to pass our page titles as context to the templates, indexed @@ -85,6 +94,7 @@ TEMPLATES = { TITLES = { "organization": "About your organization", "contact": "Your organization's contact information", + "purpose": "Purpose of your domain", } diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html new file mode 100644 index 000000000..7686358b2 --- /dev/null +++ b/src/registrar/templates/application_purpose.html @@ -0,0 +1,34 @@ + +{% extends 'application_form.html' %} +{% load widget_tweaks %} + +{% block title %}Apply for a .gov domain - Puprose{% endblock %} + +{% block form_content %} +

Purpose of your domain

+ +

Explain how you plan to use this domain. Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)?Read about activities that are prohibited on .gov domains.

+ +

All fields are required unless they are marked optional.

+ +
+
+ {{ wizard.management_form }} + {% csrf_token %} + +
+ {{ wizard.form.purpose_field|add_label_class:"usa-label" }} + {{ wizard.form.purpose_field}} + You can enter up to 500 characters +
+ + +
+ + {% if wizard.steps.prev %} + + {% endif %} + +
+ +{% endblock %} From 1a9290ea1504882a3ce32bebc4e59ed147eef8d3 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Fri, 4 Nov 2022 14:31:50 -0400 Subject: [PATCH 02/50] Add authorizing official view --- src/registrar/forms/application_wizard.py | 14 +++++ .../application_authorizing_official.html | 55 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 src/registrar/templates/application_authorizing_official.html diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 2ee7248de..d289b1f55 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -73,11 +73,23 @@ class PurposeForm(forms.Form): 'maxlength':'500', })) +class AuthorizingOfficialForm(forms.Form): + ao_given_name = forms.CharField(label="First name/given name") + ao_middle_name = forms.CharField( + required=False, + label="Middle name (optional)", + ) + ao_family_name = forms.CharField(label="Last name/family name") + ao_title = forms.CharField(label="Title or role in your organization") + ao_email = forms.EmailField(label="Email") + ao_phone = forms.CharField(label="Phone") + # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass FORMS = [ ("organization", OrganizationForm), ("contact", ContactForm), + ("authorizing_official", AuthorizingOfficialForm), ("purpose", PurposeForm), ] @@ -86,6 +98,7 @@ FORMS = [ TEMPLATES = { "organization": "application_organization.html", "contact": "application_contact.html", + "authorizing_official": "application_authorizing_official.html", "purpose": "application_purpose.html", } @@ -94,6 +107,7 @@ TEMPLATES = { TITLES = { "organization": "About your organization", "contact": "Your organization's contact information", + "authorizing_official": "Authorizing official", "purpose": "Purpose of your domain", } diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html new file mode 100644 index 000000000..7144522fa --- /dev/null +++ b/src/registrar/templates/application_authorizing_official.html @@ -0,0 +1,55 @@ + +{% extends 'application_form.html' %} +{% load widget_tweaks %} +{% load static %} + +{% block title %}Apply for a .gov domain – Authorizing official{% endblock %} + +{% block form_content %} +{% if wizard.steps.prev %} + +{% endif %} +

Authorizing official

+{{wizard.steps.current}} +{{form_titles|get_item:wizard.steps.current}} +

Who is the authorizing official for your organization

+ +

Your authorizing official is the person within your organization who can authorize your domain request. This is generally the highest ranking or highest elected official in your organization. Read more about who can serve as an authorizing official. +

+ +

All fields are required unless they are marked optional.

+ +
+ {{ wizard.management_form }} + {% csrf_token %} + +
+ {{ wizard.form.ao_given_name|add_label_class:"usa-label" }} + {{ wizard.form.ao_given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.ao_middle_name|add_label_class:"usa-label" }} + {{ wizard.form.ao_middle_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.ao_family_name|add_label_class:"usa-label" }} + {{ wizard.form.ao_family_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.ao_title|add_label_class:"usa-label" }} + {{ wizard.form.ao_title|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.ao_email|add_label_class:"usa-label" }} + {{ wizard.form.ao_email|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.ao_phone|add_label_class:"usa-label" }} + {{ wizard.form.ao_phone|add_class:"usa-input usa-input"|attr:"aria-describedby:instructions" }} +
+ + + +
+ +{% endblock %} From 3d24ed04aff2430d455a510916e6952fcccfea5c Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Fri, 4 Nov 2022 17:49:24 -0400 Subject: [PATCH 03/50] Move nav and title to form base tempalte --- .../application_authorizing_official.html | 20 +++++++++---------- src/registrar/templates/application_form.html | 17 ++++++++++++++-- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 7144522fa..4ad3a30b7 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -3,17 +3,14 @@ {% load widget_tweaks %} {% load static %} -{% block title %}Apply for a .gov domain – Authorizing official{% endblock %} +{% block backnav %} + {% with form_name="step__ao" %} + {{ block.super }} + {% endwith %} +{% endblock %} {% block form_content %} -{% if wizard.steps.prev %} - -{% endif %} +

Authorizing official

{{wizard.steps.current}} {{form_titles|get_item:wizard.steps.current}} @@ -24,7 +21,7 @@

All fields are required unless they are marked optional.

-
+ {{ wizard.management_form }} {% csrf_token %} @@ -49,7 +46,8 @@ - + {{ block.super }} +
{% endblock %} diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/application_form.html index c187dd4b9..6ae6f901b 100644 --- a/src/registrar/templates/application_form.html +++ b/src/registrar/templates/application_form.html @@ -1,13 +1,26 @@ {% extends 'base.html' %} +{% load static widget_tweaks %} +{% block title %}Apply for a .gov domain – {{form_titles|get_item:wizard.steps.current}}{% endblock %} {% block content %}
{% include 'application_sidebar.html' %}
-
- {% block form_content %}{% endblock %} + {% block backnav %} + {% if wizard.steps.prev %} + + {% endif %} + {% endblock %} + {% block form_content %} + + + {% endblock %}
{% endblock %} From 302b6f139a9553a5823c956d0500c1d40c7e83d2 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Fri, 4 Nov 2022 17:58:23 -0400 Subject: [PATCH 04/50] Remove base form content from other views --- src/registrar/templates/application_contact.html | 14 ++++++++------ .../templates/application_organization.html | 10 +++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/registrar/templates/application_contact.html b/src/registrar/templates/application_contact.html index d27dfe803..a4d58bb5d 100644 --- a/src/registrar/templates/application_contact.html +++ b/src/registrar/templates/application_contact.html @@ -2,7 +2,11 @@ {% extends 'application_form.html' %} {% load widget_tweaks %} -{% block title %}Apply for a .gov domain - Your organization's contact information{% endblock %} +{% block backnav %} + {% with form_name="step__org-contact" %} + {{ block.super }} + {% endwith %} +{% endblock %} {% block form_content %}

Your organization's contact information

@@ -14,7 +18,7 @@ of a larger entity. If so, enter information about your part of the larger entit

All fields are required unless they are marked optional.

-
+ {{ wizard.management_form }} {% csrf_token %} @@ -26,10 +30,8 @@ of a larger entity. If so, enter information about your part of the larger entit {{ wizard.form.street_address|add_class:"usa-input" }} - {% if wizard.steps.prev %} - - {% endif %} - + {{ block.super }} +
{% endblock %} diff --git a/src/registrar/templates/application_organization.html b/src/registrar/templates/application_organization.html index f994a7d1e..c80cad2c1 100644 --- a/src/registrar/templates/application_organization.html +++ b/src/registrar/templates/application_organization.html @@ -3,12 +3,16 @@ {% load widget_tweaks %} {% load dynamic_question_tags %} -{% block title %}Apply for a .gov domain - About your organization{% endblock %} +{% block backnav %} + {% with form_name="step__about-org" %} + {{ block.super }} + {% endwith %} +{% endblock %} {% block form_content %}

About your organization

-
+ {{ wizard.management_form }} {% csrf_token %} @@ -48,7 +52,7 @@ {{ wizard.form.is_election_board|add_class:"usa-radio" }} - + {{ block.super }}
{% endblock %} From dc9b8dac0ed5dde3c7c6a12cb7153812303a3a7f Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 7 Nov 2022 15:27:56 -0500 Subject: [PATCH 05/50] Fix naming for ao fields --- src/registrar/forms/application_wizard.py | 12 +++++----- .../application_authorizing_official.html | 24 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index d289b1f55..416a036d1 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -74,15 +74,15 @@ class PurposeForm(forms.Form): })) class AuthorizingOfficialForm(forms.Form): - ao_given_name = forms.CharField(label="First name/given name") - ao_middle_name = forms.CharField( + given_name = forms.CharField(label="First name/given name") + middle_name = forms.CharField( required=False, label="Middle name (optional)", ) - ao_family_name = forms.CharField(label="Last name/family name") - ao_title = forms.CharField(label="Title or role in your organization") - ao_email = forms.EmailField(label="Email") - ao_phone = forms.CharField(label="Phone") + family_name = forms.CharField(label="Last name/family name") + title = forms.CharField(label="Title or role in your organization") + email = forms.EmailField(label="Email") + phone = forms.CharField(label="Phone") # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 4ad3a30b7..71da33340 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -26,23 +26,23 @@ {% csrf_token %}
- {{ wizard.form.ao_given_name|add_label_class:"usa-label" }} - {{ wizard.form.ao_given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.given_name|add_label_class:"usa-label" }} + {{ wizard.form.given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} - {{ wizard.form.ao_middle_name|add_label_class:"usa-label" }} - {{ wizard.form.ao_middle_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.middle_name|add_label_class:"usa-label" }} + {{ wizard.form.middle_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} - {{ wizard.form.ao_family_name|add_label_class:"usa-label" }} - {{ wizard.form.ao_family_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.family_name|add_label_class:"usa-label" }} + {{ wizard.form.family_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} - {{ wizard.form.ao_title|add_label_class:"usa-label" }} - {{ wizard.form.ao_title|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.title|add_label_class:"usa-label" }} + {{ wizard.form.title|add_class:"usa-input"|attr:"aria-describedby:instructions" }} - {{ wizard.form.ao_email|add_label_class:"usa-label" }} - {{ wizard.form.ao_email|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.email|add_label_class:"usa-label" }} + {{ wizard.form.email|add_class:"usa-input"|attr:"aria-describedby:instructions" }} - {{ wizard.form.ao_phone|add_label_class:"usa-label" }} - {{ wizard.form.ao_phone|add_class:"usa-input usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.phone|add_label_class:"usa-label" }} + {{ wizard.form.phone|add_class:"usa-input usa-input"|attr:"aria-describedby:instructions" }}
From be4527386cc165103a129e30c347c69f5e1d048b Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 7 Nov 2022 15:48:08 -0500 Subject: [PATCH 06/50] Move purpose attributes back to the view --- src/registrar/forms/application_wizard.py | 7 +------ src/registrar/templates/application_purpose.html | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 416a036d1..48ba1be1e 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -66,12 +66,7 @@ class ContactForm(forms.Form): street_address = forms.CharField(label="Street address") class PurposeForm(forms.Form): - purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea( - attrs={ 'class':'usa-textarea usa-character-count__field', - 'id':'with-hint', - 'aria-describedby':'instructions', - 'maxlength':'500', - })) + purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea()) class AuthorizingOfficialForm(forms.Form): given_name = forms.CharField(label="First name/given name") diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index 7686358b2..0d08c1291 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -18,11 +18,10 @@
{{ wizard.form.purpose_field|add_label_class:"usa-label" }} - {{ wizard.form.purpose_field}} + {{ wizard.form.purpose_field|add_class:"usa-textarea usa-character-count__field"|attr:"aria-describedby:instructions"|attr:"maxlength=500" }} You can enter up to 500 characters
- {% if wizard.steps.prev %} From 62d36751107ad36d49ac77df0fdf0dbdfa532e6a Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 7 Nov 2022 16:02:12 -0500 Subject: [PATCH 07/50] Move h1 to form base --- src/registrar/templates/application_authorizing_official.html | 3 --- src/registrar/templates/application_contact.html | 1 - src/registrar/templates/application_form.html | 1 + src/registrar/templates/application_organization.html | 1 - src/registrar/templates/application_purpose.html | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 71da33340..a72de94f2 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -11,9 +11,6 @@ {% block form_content %} -

Authorizing official

-{{wizard.steps.current}} -{{form_titles|get_item:wizard.steps.current}}

Who is the authorizing official for your organization

Your authorizing official is the person within your organization who can authorize your domain request. This is generally the highest ranking or highest elected official in your organization. Read more about who can serve as an authorizing official. diff --git a/src/registrar/templates/application_contact.html b/src/registrar/templates/application_contact.html index a4d58bb5d..2dd5e697e 100644 --- a/src/registrar/templates/application_contact.html +++ b/src/registrar/templates/application_contact.html @@ -9,7 +9,6 @@ {% endblock %} {% block form_content %} -

Your organization's contact information

What is the name and mailing address of your organization?

diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/application_form.html index 6ae6f901b..b2feb9bb1 100644 --- a/src/registrar/templates/application_form.html +++ b/src/registrar/templates/application_form.html @@ -17,6 +17,7 @@ {% endif %} {% endblock %} +

{{form_titles|get_item:wizard.steps.current}}

{% block form_content %} diff --git a/src/registrar/templates/application_organization.html b/src/registrar/templates/application_organization.html index c80cad2c1..5bc9840bb 100644 --- a/src/registrar/templates/application_organization.html +++ b/src/registrar/templates/application_organization.html @@ -10,7 +10,6 @@ {% endblock %} {% block form_content %} -

About your organization

{{ wizard.management_form }} diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index 0d08c1291..00b8793dd 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -5,7 +5,6 @@ {% block title %}Apply for a .gov domain - Puprose{% endblock %} {% block form_content %} -

Purpose of your domain

Explain how you plan to use this domain. Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)?Read about activities that are prohibited on .gov domains.

From 2d53a7f07cdafd4e4450a949438feb6384f8625e Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 7 Nov 2022 18:42:57 -0500 Subject: [PATCH 08/50] Create current site and .gov views --- src/registrar/forms/application_wizard.py | 23 +++++- .../templates/application_current_sites.html | 25 ++++++ .../templates/application_dotgov_domain.html | 77 +++++++++++++++++++ 3 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 src/registrar/templates/application_current_sites.html create mode 100644 src/registrar/templates/application_dotgov_domain.html diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 48ba1be1e..855a24106 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -65,9 +65,6 @@ class ContactForm(forms.Form): organization_name = forms.CharField(label="Organization Name") street_address = forms.CharField(label="Street address") -class PurposeForm(forms.Form): - purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea()) - class AuthorizingOfficialForm(forms.Form): given_name = forms.CharField(label="First name/given name") middle_name = forms.CharField( @@ -79,12 +76,28 @@ class AuthorizingOfficialForm(forms.Form): email = forms.EmailField(label="Email") phone = forms.CharField(label="Phone") +class CurrentSitesForm(forms.Form): + current_site = forms.CharField(label="Enter your organization’s public website, if you have one. For example, www.city.com.") + +class DotGovDomainForm(forms.Form): + dotgov_domain = forms.CharField(label="What .gov domain do you want?") + alternative_domain = forms.CharField( + required = False, + label="Are there other domains you’d like if we can’t give you your first choice? Entering alternative domains is optional.", + ) + +class PurposeForm(forms.Form): + purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea()) + + # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass FORMS = [ ("organization", OrganizationForm), ("contact", ContactForm), ("authorizing_official", AuthorizingOfficialForm), + ("current_sites", CurrentSitesForm), + ("dotgov_domain", DotGovDomainForm), ("purpose", PurposeForm), ] @@ -94,6 +107,8 @@ TEMPLATES = { "organization": "application_organization.html", "contact": "application_contact.html", "authorizing_official": "application_authorizing_official.html", + "current_sites": "application_current_sites.html", + "dotgov_domain": "application_dotgov_domain.html", "purpose": "application_purpose.html", } @@ -103,6 +118,8 @@ TITLES = { "organization": "About your organization", "contact": "Your organization's contact information", "authorizing_official": "Authorizing official", + "current_sites": "Website for your organization", + "dotgov_domain": ".gov domain", "purpose": "Purpose of your domain", } diff --git a/src/registrar/templates/application_current_sites.html b/src/registrar/templates/application_current_sites.html new file mode 100644 index 000000000..c7d344462 --- /dev/null +++ b/src/registrar/templates/application_current_sites.html @@ -0,0 +1,25 @@ + +{% extends 'application_form.html' %} +{% load widget_tweaks %} +{% load static %} + +{% block backnav %} + {% with form_name="step__current-site" %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block form_content %} + + + {{ wizard.management_form }} + {% csrf_token %} + + {{ wizard.form.current_site|add_label_class:"usa-label" }} + {{ wizard.form.current_site|add_class:"usa-input" }} + + {{ block.super }} + + + +{% endblock %} diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html new file mode 100644 index 000000000..8f0357e8c --- /dev/null +++ b/src/registrar/templates/application_dotgov_domain.html @@ -0,0 +1,77 @@ + +{% extends 'application_form.html' %} +{% load widget_tweaks static%} + +{% block backnav %} + {% with form_name="step__dotgov-domain" %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block form_content %} +

Before requesting a .gov domain, please make sure it meets our naming requirements. Your domain name must: +

    +
  • Be available
  • +
  • Be unique
  • +
  • Relate to your organization’s name, location, and/or services
  • +
  • Be clear to the general public. Your domain name must not be easily confused with other organizations.
  • +
+

+ +

Note that only federal agencies can request generic terms like vote.gov.

+ +

We’ll try to give you the domain you want. We first need to make sure your request meets our requirements. We’ll work with you to find the best domain for your organization.

+ +

Here are a few domain examples for your type of organization.

+ +

Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.

+

Examples: +

    +
  • www.BlufftonIndiana.gov
  • +
  • www.CityofEudoraKS.gov
  • +
  • www.WallawallaWA.gov
  • +
+

+

Some cities don’t have to refer to their state. +

    +
  • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
  • +
  • Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.
  • +
  • The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that don’t refer to their state.
  • +
+

+ +
+

What .gov domain do you want?

+

After you enter your domain, we’ll make sure it’s available and that it meets some of our naming requirements. If your domain passes these initial checks, we’ll verify that it meets all of our requirements once you complete and submit the rest of the domain request form.

+ + {{ wizard.management_form }} + {% csrf_token %} + {{ wizard.form.dotgov_domain|add_label_class:"usa-label" }} +
+ www. + {{ wizard.form.dotgov_domain|add_class:"usa-input"|attr:"aria-describedby:domain_instructions" }} + .gov +
+ +

Alternative domains

+ +
+ {{ wizard.form.alternative_domain|add_label_class:"usa-label" }} +
+ www. + {{ wizard.form.alternative_domain|add_class:"usa-input" }} + .gov +
+ + +
+ + {{ block.super }} + +
+ +{% endblock %} From b42340d7e9a09c3faa2d1545675b63d4158cd30c Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 7 Nov 2022 18:57:17 -0500 Subject: [PATCH 09/50] remove old previous bottom from purpose --- src/registrar/templates/application_purpose.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index 00b8793dd..0903880e7 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -20,13 +20,7 @@ {{ wizard.form.purpose_field|add_class:"usa-textarea usa-character-count__field"|attr:"aria-describedby:instructions"|attr:"maxlength=500" }} You can enter up to 500 characters - - - {% if wizard.steps.prev %} - - {% endif %} - {% endblock %} From 1974ac6b07360abc549ebca5c53203ba6d6b82e6 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 7 Nov 2022 19:00:54 -0500 Subject: [PATCH 10/50] Add your contact view, rename org contact --- src/registrar/forms/application_wizard.py | 22 ++++++-- ...tact.html => application_org_contact.html} | 0 .../templates/application_purpose.html | 3 ++ .../templates/application_your_contact.html | 53 +++++++++++++++++++ 4 files changed, 74 insertions(+), 4 deletions(-) rename src/registrar/templates/{application_contact.html => application_org_contact.html} (100%) create mode 100644 src/registrar/templates/application_your_contact.html diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 855a24106..5b7a2806d 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -89,38 +89,52 @@ class DotGovDomainForm(forms.Form): class PurposeForm(forms.Form): purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea()) +class YourContactForm(forms.Form): + given_name = forms.CharField(label="First name/given name") + middle_name = forms.CharField( + required=False, + label="Middle name (optional)", + ) + family_name = forms.CharField(label="Last name/family name") + title = forms.CharField(label="Title or role in your organization") + email = forms.EmailField(label="Email") + phone = forms.CharField(label="Phone") + # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass FORMS = [ ("organization", OrganizationForm), - ("contact", ContactForm), + ("org_contact", ContactForm), ("authorizing_official", AuthorizingOfficialForm), ("current_sites", CurrentSitesForm), ("dotgov_domain", DotGovDomainForm), ("purpose", PurposeForm), + ("your_contact", YourContactForm), ] # Dict to match up the right template with the right step. Keys here must # match the first elements of the tuples in FORMS TEMPLATES = { "organization": "application_organization.html", - "contact": "application_contact.html", + "org_contact": "application_org_contact.html", "authorizing_official": "application_authorizing_official.html", "current_sites": "application_current_sites.html", "dotgov_domain": "application_dotgov_domain.html", "purpose": "application_purpose.html", + "your_contact": "application_your_contact.html", } # We need to pass our page titles as context to the templates, indexed # by the step names TITLES = { "organization": "About your organization", - "contact": "Your organization's contact information", + "org_contact": "Your organization's contact information", "authorizing_official": "Authorizing official", - "current_sites": "Website for your organization", + "current_sites": "Organization website", "dotgov_domain": ".gov domain", "purpose": "Purpose of your domain", + "your_contact": "Your contact information", } diff --git a/src/registrar/templates/application_contact.html b/src/registrar/templates/application_org_contact.html similarity index 100% rename from src/registrar/templates/application_contact.html rename to src/registrar/templates/application_org_contact.html diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index 0903880e7..6a7682b63 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -21,6 +21,9 @@ You can enter up to 500 characters + + {{ block.super }} + {% endblock %} diff --git a/src/registrar/templates/application_your_contact.html b/src/registrar/templates/application_your_contact.html new file mode 100644 index 000000000..490f334b5 --- /dev/null +++ b/src/registrar/templates/application_your_contact.html @@ -0,0 +1,53 @@ + +{% extends 'application_form.html' %} +{% load widget_tweaks %} +{% load static %} + +{% block backnav %} + {% with form_name="step__ao" %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block form_content %} + +
+

We’ll use the following information to contact you about your domain request and, once your request is approved, about managing your domain.

+ +

If you’d like us to use a different name, email, or phone number you can make those changes below. Changing your contact information here won’t affect your login.gov account information.

+ +

The contact information you provide here won’t be public and will only be used for the .gov registry.

+
+ +

All fields are required unless they are marked optional.

+ +
+ {{ wizard.management_form }} + {% csrf_token %} + +
+ {{ wizard.form.given_name|add_label_class:"usa-label" }} + {{ wizard.form.given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.middle_name|add_label_class:"usa-label" }} + {{ wizard.form.middle_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.family_name|add_label_class:"usa-label" }} + {{ wizard.form.family_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.title|add_label_class:"usa-label" }} + {{ wizard.form.title|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.email|add_label_class:"usa-label" }} + {{ wizard.form.email|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ wizard.form.phone|add_label_class:"usa-label" }} + {{ wizard.form.phone|add_class:"usa-input usa-input"|attr:"aria-describedby:instructions" }} +
+ + + {{ block.super }} + +
+ +{% endblock %} From 7f2df61bf857fbc9026e462539f13f833825f95b Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 7 Nov 2022 19:15:57 -0500 Subject: [PATCH 11/50] Update org contact with all fields --- src/registrar/forms/application_wizard.py | 13 ++++++++----- .../templates/application_org_contact.html | 11 +++++++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 5b7a2806d..5ed5a0ba0 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -61,9 +61,12 @@ class OrganizationForm(forms.Form): ) -class ContactForm(forms.Form): +class OrgContactForm(forms.Form): organization_name = forms.CharField(label="Organization Name") - street_address = forms.CharField(label="Street address") + address_line1 = forms.CharField(label="Address line 1") + address_line2 = forms.CharField(label="Address line 2") + us_state = forms.CharField(label="State") + zipcode = forms.CharField(label="ZIP code") class AuthorizingOfficialForm(forms.Form): given_name = forms.CharField(label="First name/given name") @@ -105,7 +108,7 @@ class YourContactForm(forms.Form): # subclass FORMS = [ ("organization", OrganizationForm), - ("org_contact", ContactForm), + ("org_contact", OrgContactForm), ("authorizing_official", AuthorizingOfficialForm), ("current_sites", CurrentSitesForm), ("dotgov_domain", DotGovDomainForm), @@ -128,8 +131,8 @@ TEMPLATES = { # We need to pass our page titles as context to the templates, indexed # by the step names TITLES = { - "organization": "About your organization", - "org_contact": "Your organization's contact information", + "organization": "Type of organization", + "org_contact": "Organization name and mailing address", "authorizing_official": "Authorizing official", "current_sites": "Organization website", "dotgov_domain": ".gov domain", diff --git a/src/registrar/templates/application_org_contact.html b/src/registrar/templates/application_org_contact.html index 2dd5e697e..57e98f950 100644 --- a/src/registrar/templates/application_org_contact.html +++ b/src/registrar/templates/application_org_contact.html @@ -25,8 +25,15 @@ of a larger entity. If so, enter information about your part of the larger entit {{ wizard.form.organization_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }}
- {{ wizard.form.street_address|add_label_class:"usa-label" }} - {{ wizard.form.street_address|add_class:"usa-input" }} + {{ wizard.form.address_line1|add_label_class:"usa-label" }} + {{ 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-input" }} + {{ wizard.form.zipcode|add_label_class:"usa-label" }} + {{ wizard.form.zipcode|add_class:"usa-input" }} +
{{ block.super }} From 76b6256202b3fe0c4dadfa786c19e421636f4e0d Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 12:51:55 -0500 Subject: [PATCH 12/50] Set optional fields to be optional --- src/registrar/forms/application_wizard.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 5ed5a0ba0..f88ef7960 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -64,7 +64,10 @@ class OrganizationForm(forms.Form): class OrgContactForm(forms.Form): organization_name = forms.CharField(label="Organization Name") address_line1 = forms.CharField(label="Address line 1") - address_line2 = forms.CharField(label="Address line 2") + address_line2 = forms.CharField( + required=False, + label="Address line 2", + ) us_state = forms.CharField(label="State") zipcode = forms.CharField(label="ZIP code") @@ -80,7 +83,9 @@ class AuthorizingOfficialForm(forms.Form): phone = forms.CharField(label="Phone") class CurrentSitesForm(forms.Form): - current_site = forms.CharField(label="Enter your organization’s public website, if you have one. For example, www.city.com.") + current_site = forms.CharField( + required=False, + label="Enter your organization’s public website, if you have one. For example, www.city.com.") class DotGovDomainForm(forms.Form): dotgov_domain = forms.CharField(label="What .gov domain do you want?") From 3f8312e148ca2e286bf6d5da34c4f04b4a21ea38 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 13:40:18 -0500 Subject: [PATCH 13/50] Update state list, change to combo box --- src/registrar/forms/application_wizard.py | 5 ++++- src/registrar/templates/application_org_contact.html | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index f88ef7960..b0eb827ca 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -68,7 +68,10 @@ class OrgContactForm(forms.Form): required=False, label="Address line 2", ) - us_state = forms.CharField(label="State") + us_state = forms.ChoiceField( + label="State", + choices=[('AL', 'Alabama'), ('AK', 'Alaska'), ('AZ', 'Arizona'), ('AR', 'Arkansas'), ('CA', 'California'), ('CO', 'Colorado'), ('CT', 'Connecticut'), ('DE', 'Delaware'), ('DC', 'District of Columbia'), ('FL', 'Florida'), ('GA', 'Georgia'), ('HI', 'Hawaii'), ('ID', 'Idaho'), ('IL', 'Illinois'), ('IN', 'Indiana'), ('IA', 'Iowa'), ('KS', 'Kansas'), ('KY', 'Kentucky'), ('LA', 'Louisiana'), ('ME', 'Maine'), ('MD', 'Maryland'), ('MA', 'Massachusetts'), ('MI', 'Michigan'), ('MN', 'Minnesota'), ('MS', 'Mississippi'), ('MO', 'Missouri'), ('MT', 'Montana'), ('NE', 'Nebraska'), ('NV', 'Nevada'), ('NH', 'New Hampshire'), ('NJ', 'New Jersey'), ('NM', 'New Mexico'), ('NY', 'New York'), ('NC', 'North Carolina'), ('ND', 'North Dakota'), ('OH', 'Ohio'), ('OK', 'Oklahoma'), ('OR', 'Oregon'), ('PA', 'Pennsylvania'), ('RI', 'Rhode Island'), ('SC', 'South Carolina'), ('SD', 'South Dakota'), ('TN', 'Tennessee'), ('TX', 'Texas'), ('UT', 'Utah'), ('VT', 'Vermont'), ('VA', 'Virginia'), ('WA', 'Washington'), ('WV', 'West Virginia'), ('WI', 'Wisconsin'), ('WY', 'Wyoming'), ('AS', 'American Samoa'), ('GU', 'Guam'), ('MP', 'Northern Mariana Islands'), ('PR', 'Puerto Rico'), ('VI', 'Virgin Islands'),], + ) zipcode = forms.CharField(label="ZIP code") class AuthorizingOfficialForm(forms.Form): diff --git a/src/registrar/templates/application_org_contact.html b/src/registrar/templates/application_org_contact.html index 57e98f950..a7d9c51b8 100644 --- a/src/registrar/templates/application_org_contact.html +++ b/src/registrar/templates/application_org_contact.html @@ -30,7 +30,9 @@ of a larger entity. If so, enter information about your part of the larger entit {{ 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-input" }} +
+ {{ wizard.form.us_state|add_class:"usa-select" }} +
{{ wizard.form.zipcode|add_label_class:"usa-label" }} {{ wizard.form.zipcode|add_class:"usa-input" }} From cbb6ffe19a45bcdd43aa7e5f32e74215fb71840a Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 14:19:16 -0500 Subject: [PATCH 14/50] Styling tweaks on dotgov input --- src/registrar/templates/application_dotgov_domain.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index 8f0357e8c..06c517756 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -48,9 +48,9 @@ {% csrf_token %} {{ wizard.form.dotgov_domain|add_label_class:"usa-label" }}
- www. + www. {{ wizard.form.dotgov_domain|add_class:"usa-input"|attr:"aria-describedby:domain_instructions" }} - .gov + .gov

Alternative domains

@@ -58,9 +58,9 @@
{{ wizard.form.alternative_domain|add_label_class:"usa-label" }}
- www. + www. {{ wizard.form.alternative_domain|add_class:"usa-input" }} - .gov + .gov
+
+ + {{ block.super }} + + + +{% endblock %} From 0b67dcc25e7aaebbed197de66cc057534243028d Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 14:38:46 -0500 Subject: [PATCH 16/50] Move form id to base template, remove backnav block --- .../application_authorizing_official.html | 8 +------- .../templates/application_current_sites.html | 8 +------- .../templates/application_dotgov_domain.html | 8 +------- src/registrar/templates/application_form.html | 16 +++++++--------- .../templates/application_org_contact.html | 8 +------- .../templates/application_organization.html | 8 +------- src/registrar/templates/application_purpose.html | 4 +--- .../templates/application_your_contact.html | 8 +------- 8 files changed, 14 insertions(+), 54 deletions(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index a72de94f2..2f1ff6869 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -3,12 +3,6 @@ {% load widget_tweaks %} {% load static %} -{% block backnav %} - {% with form_name="step__ao" %} - {{ block.super }} - {% endwith %} -{% endblock %} - {% block form_content %}

Who is the authorizing official for your organization

@@ -18,7 +12,7 @@

All fields are required unless they are marked optional.

-
+ {{ wizard.management_form }} {% csrf_token %} diff --git a/src/registrar/templates/application_current_sites.html b/src/registrar/templates/application_current_sites.html index c7d344462..535a8f5dc 100644 --- a/src/registrar/templates/application_current_sites.html +++ b/src/registrar/templates/application_current_sites.html @@ -3,15 +3,9 @@ {% load widget_tweaks %} {% load static %} -{% block backnav %} - {% with form_name="step__current-site" %} - {{ block.super }} - {% endwith %} -{% endblock %} - {% block form_content %} - + {{ wizard.management_form }} {% csrf_token %} diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index 06c517756..306a2ec0e 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -2,12 +2,6 @@ {% extends 'application_form.html' %} {% load widget_tweaks static%} -{% block backnav %} - {% with form_name="step__dotgov-domain" %} - {{ block.super }} - {% endwith %} -{% endblock %} - {% block form_content %}

Before requesting a .gov domain, please make sure it meets our naming requirements. Your domain name must:

    @@ -40,7 +34,7 @@

- +

What .gov domain do you want?

After you enter your domain, we’ll make sure it’s available and that it meets some of our naming requirements. If your domain passes these initial checks, we’ll verify that it meets all of our requirements once you complete and submit the rest of the domain request form.

diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/application_form.html index 3112b65d8..f49b288c7 100644 --- a/src/registrar/templates/application_form.html +++ b/src/registrar/templates/application_form.html @@ -8,15 +8,13 @@ {% include 'application_sidebar.html' %}
- {% block backnav %} - {% if wizard.steps.prev %} - - {% endif %} - {% endblock %} + {% if wizard.steps.prev %} + + {% endif %}

{{form_titles|get_item:wizard.steps.current}}

{% block form_content %} diff --git a/src/registrar/templates/application_org_contact.html b/src/registrar/templates/application_org_contact.html index a7d9c51b8..cc9c80fcf 100644 --- a/src/registrar/templates/application_org_contact.html +++ b/src/registrar/templates/application_org_contact.html @@ -2,12 +2,6 @@ {% extends 'application_form.html' %} {% load widget_tweaks %} -{% block backnav %} - {% with form_name="step__org-contact" %} - {{ block.super }} - {% endwith %} -{% endblock %} - {% block form_content %}

What is the name and mailing address of your organization?

@@ -17,7 +11,7 @@ of a larger entity. If so, enter information about your part of the larger entit

All fields are required unless they are marked optional.

- + {{ wizard.management_form }} {% csrf_token %} diff --git a/src/registrar/templates/application_organization.html b/src/registrar/templates/application_organization.html index 5bc9840bb..4c562d96c 100644 --- a/src/registrar/templates/application_organization.html +++ b/src/registrar/templates/application_organization.html @@ -3,15 +3,9 @@ {% load widget_tweaks %} {% load dynamic_question_tags %} -{% block backnav %} - {% with form_name="step__about-org" %} - {{ block.super }} - {% endwith %} -{% endblock %} - {% block form_content %} - + {{ wizard.management_form }} {% csrf_token %} diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index 6a7682b63..6b98d06f5 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -2,15 +2,13 @@ {% extends 'application_form.html' %} {% load widget_tweaks %} -{% block title %}Apply for a .gov domain - Puprose{% endblock %} - {% block form_content %}

Explain how you plan to use this domain. Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)?Read about activities that are prohibited on .gov domains.

All fields are required unless they are marked optional.

- +
{{ wizard.management_form }} {% csrf_token %} diff --git a/src/registrar/templates/application_your_contact.html b/src/registrar/templates/application_your_contact.html index 490f334b5..8e8b340d3 100644 --- a/src/registrar/templates/application_your_contact.html +++ b/src/registrar/templates/application_your_contact.html @@ -3,12 +3,6 @@ {% load widget_tweaks %} {% load static %} -{% block backnav %} - {% with form_name="step__ao" %} - {{ block.super }} - {% endwith %} -{% endblock %} - {% block form_content %}
@@ -21,7 +15,7 @@

All fields are required unless they are marked optional.

- + {{ wizard.management_form }} {% csrf_token %} From 281cff4131faea5f84a599b8cebfe8f8497230c1 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 14:52:34 -0500 Subject: [PATCH 17/50] Add security email view --- src/registrar/forms/application_wizard.py | 8 +++++++ .../templates/application_security_email.html | 21 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/registrar/templates/application_security_email.html diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 167d89c38..d1e53315e 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -122,6 +122,11 @@ class OtherContactsForm(forms.Form): email = forms.EmailField(label="Email") phone = forms.CharField(label="Phone") +class SecurityEmailForm(forms.Form): + email = forms.EmailField( + required=False, + label="Email", + ) # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass @@ -134,6 +139,7 @@ FORMS = [ ("purpose", PurposeForm), ("your_contact", YourContactForm), ("other_contacts", OtherContactsForm), + ("security_email", SecurityEmailForm), ] # Dict to match up the right template with the right step. Keys here must @@ -147,6 +153,7 @@ TEMPLATES = { "purpose": "application_purpose.html", "your_contact": "application_your_contact.html", "other_contacts": "application_other_contacts.html", + "security_email": "application_security_email.html", } # We need to pass our page titles as context to the templates, indexed @@ -160,6 +167,7 @@ TITLES = { "purpose": "Purpose of your domain", "your_contact": "Your contact information", "other_contacts": "Other contacts for your domain", + "security_email": "Security email for public use", } diff --git a/src/registrar/templates/application_security_email.html b/src/registrar/templates/application_security_email.html new file mode 100644 index 000000000..86410f489 --- /dev/null +++ b/src/registrar/templates/application_security_email.html @@ -0,0 +1,21 @@ + +{% extends 'application_form.html' %} +{% load widget_tweaks %} +{% load static %} + +{% block form_content %} + +

We strongly recommend that you provide a security email. This email will allow the public to report observed or suspected security issues on your domain. Security emails are made public. We recommend using an alias, like security@<domain.gov>.

+ + + {{ wizard.management_form }} + {% csrf_token %} + + {{ wizard.form.email|add_label_class:"usa-label" }} + {{ wizard.form.email|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + + {{ block.super }} + + + +{% endblock %} From d540337f070ac96f7e939fd2aec431b11ec0b96c Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 14:52:57 -0500 Subject: [PATCH 18/50] Make phone and zip input fields smaller --- src/registrar/templates/application_authorizing_official.html | 2 +- src/registrar/templates/application_org_contact.html | 2 +- src/registrar/templates/application_your_contact.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 2f1ff6869..5361b91d5 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -33,7 +33,7 @@ {{ wizard.form.email|add_class:"usa-input"|attr:"aria-describedby:instructions" }} {{ wizard.form.phone|add_label_class:"usa-label" }} - {{ wizard.form.phone|add_class:"usa-input usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.phone|add_class:"usa-input usa-input--medium"|attr:"aria-describedby:instructions" }} diff --git a/src/registrar/templates/application_org_contact.html b/src/registrar/templates/application_org_contact.html index cc9c80fcf..eeb4943dd 100644 --- a/src/registrar/templates/application_org_contact.html +++ b/src/registrar/templates/application_org_contact.html @@ -28,7 +28,7 @@ of a larger entity. If so, enter information about your part of the larger entit {{ wizard.form.us_state|add_class:"usa-select" }}
{{ wizard.form.zipcode|add_label_class:"usa-label" }} - {{ wizard.form.zipcode|add_class:"usa-input" }} + {{ wizard.form.zipcode|add_class:"usa-input usa-input--small" }} diff --git a/src/registrar/templates/application_your_contact.html b/src/registrar/templates/application_your_contact.html index 8e8b340d3..e9d70daaa 100644 --- a/src/registrar/templates/application_your_contact.html +++ b/src/registrar/templates/application_your_contact.html @@ -36,7 +36,7 @@ {{ wizard.form.email|add_class:"usa-input"|attr:"aria-describedby:instructions" }} {{ wizard.form.phone|add_label_class:"usa-label" }} - {{ wizard.form.phone|add_class:"usa-input usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.phone|add_class:"usa-input usa-input--medium"|attr:"aria-describedby:instructions" }} From a946a5e629b02582b7173905cd092593a794d1a2 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 15:00:55 -0500 Subject: [PATCH 19/50] Add anything else view --- src/registrar/forms/application_wizard.py | 10 ++++++++ .../templates/application_anything_else.html | 25 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 src/registrar/templates/application_anything_else.html diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index d1e53315e..b5dc782ff 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -128,6 +128,13 @@ class SecurityEmailForm(forms.Form): label="Email", ) +class AnythingElseForm(forms.Form): + anything_else = forms.CharField( + required=False, + label="Anything else we should know", + widget=forms.Textarea() + ) + # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass FORMS = [ @@ -140,6 +147,7 @@ FORMS = [ ("your_contact", YourContactForm), ("other_contacts", OtherContactsForm), ("security_email", SecurityEmailForm), + ("anything_else", AnythingElseForm), ] # Dict to match up the right template with the right step. Keys here must @@ -154,6 +162,7 @@ TEMPLATES = { "your_contact": "application_your_contact.html", "other_contacts": "application_other_contacts.html", "security_email": "application_security_email.html", + "anything_else": "application_anything_else.html", } # We need to pass our page titles as context to the templates, indexed @@ -168,6 +177,7 @@ TITLES = { "your_contact": "Your contact information", "other_contacts": "Other contacts for your domain", "security_email": "Security email for public use", + "anything_else": "Anything else we should know?", } diff --git a/src/registrar/templates/application_anything_else.html b/src/registrar/templates/application_anything_else.html new file mode 100644 index 000000000..471b1f47a --- /dev/null +++ b/src/registrar/templates/application_anything_else.html @@ -0,0 +1,25 @@ + +{% extends 'application_form.html' %} +{% load widget_tweaks %} + +{% block form_content %} + +

Is there anything else we should know about your domain request?

+ +
+
+ {{ wizard.management_form }} + {% csrf_token %} + +
+ {{ wizard.form.anything_else|add_label_class:"usa-label" }} + {{ wizard.form.anything_else|add_class:"usa-textarea usa-character-count__field"|attr:"aria-describedby:instructions"|attr:"maxlength=500" }} + You can enter up to 500 characters +
+
+ + {{ block.super }} + +
+ +{% endblock %} From fe6aa96a028573e321ad321f66f69ce5ad76a706 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 17:02:49 -0500 Subject: [PATCH 20/50] Add requirements view --- src/registrar/forms/application_wizard.py | 6 ++ .../templates/application_requirements.html | 72 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 src/registrar/templates/application_requirements.html diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index b5dc782ff..c861c8627 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -135,6 +135,9 @@ class AnythingElseForm(forms.Form): widget=forms.Textarea() ) +class RequirementsForm(forms.Form): + agree_check = forms.BooleanField(label="I read and agree to the .gov domain requirements.") + # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass FORMS = [ @@ -148,6 +151,7 @@ FORMS = [ ("other_contacts", OtherContactsForm), ("security_email", SecurityEmailForm), ("anything_else", AnythingElseForm), + ("requirements", RequirementsForm), ] # Dict to match up the right template with the right step. Keys here must @@ -163,6 +167,7 @@ TEMPLATES = { "other_contacts": "application_other_contacts.html", "security_email": "application_security_email.html", "anything_else": "application_anything_else.html", + "requirements": "application_requirements.html", } # We need to pass our page titles as context to the templates, indexed @@ -178,6 +183,7 @@ TITLES = { "other_contacts": "Other contacts for your domain", "security_email": "Security email for public use", "anything_else": "Anything else we should know?", + "requirements": "Requirements for registration and operation of .gov domains", } diff --git a/src/registrar/templates/application_requirements.html b/src/registrar/templates/application_requirements.html new file mode 100644 index 000000000..f5f41a877 --- /dev/null +++ b/src/registrar/templates/application_requirements.html @@ -0,0 +1,72 @@ + +{% extends 'application_form.html' %} +{% load widget_tweaks %} + +{% block form_content %} + +

The .gov domain exists to support a broad diversity of government missions and public initiatives. Generally, the .gov registry does not review or audit how government organizations use their domains.

+ +

However, misuse of an individual .gov domain can reflect upon the integrity of the entire .gov space. There are categories of misuse that are statutorily prohibited or abusive in nature.

+ +

Prohibited activities for .gov domains

+ +

Commercial purposes

+

A .gov domain must not be used for commercial purposes, such as advertising benefitting private individuals or entities.

+ +

Political campaigns

+

A .gov domain must not be used for political campaigns.

+ +

Illegal content

+

A .gov domain must not be used to distribute or promote material whose distribution violates applicable law.

+ +

Malicious cyber activity

+

.gov is a trusted and safe space. .gov domains must not distribute malware, host open redirects, or otherwise engage in malicious cyber activity.

+ + +

Required activities for .gov domain registrants

+ +

Keep your contact information update

+

As a .gov domain registrant, maintain current and accurate contact information in the .gov registrar. We strongly recommend that you create and use a security contact.

+ +

Be responsive if we contact you

+

Registrants should respond in a timely manner to communications about required and prohibited activities.

+ + +

Domains can be suspended or terminated for violations

+

The .gov program may need to suspend or terminate a domain registration for violations. Registrants should respond in a timely manner to communications about prohibited activities.

+

When we discover a violation, we will make reasonable efforts to contact a registrant, including: +

    +
  • Emails to domain contacts
  • +
  • Phone calls to domain contacts
  • +
  • Email or phone call to the authorizing official
  • +
  • Email or phone call to the government organization, a parent organization, or affiliated entities
  • +
+

+ +

We understand the critical importance of the availability of .gov domains. Suspending or terminating a .gov domain is reserved only for prolonged, unresolved serious violations where the registrant is non-responsive. We will make extensive efforts to contact registrants and to identify potential solutions, and will make reasonable accommodations for remediation timelines proportional to the severity of the issue.

+ + +

HSTS preloading

+

The .gov program will preload all newly registered .gov domains for HTTP Strict Transport Security (HSTS).

+

HSTS is a simple and widely-supported standard that protects visitors by ensuring that their browsers always connect to a website over HTTPS. HSTS removes the need to redirect users from http:// to https:// URLs. (This redirection is a security risk that HSTS eliminates.)

+

HSTS preloading impacts web traffic only. Once a domain is on the HSTS preload list, modern web browsers will enforce HTTPS connections for all websites hosted on the .gov domain. Users will not be able to click through warnings to reach a site. Non-web uses of .gov (email, VPN, APIs, etc.) are not affected.

+ + +

Acknowledgement of .gov domain requirements

+ +
+
+ {{ wizard.management_form }} + {% csrf_token %} + +
+ {{ wizard.form.agree_check|add_class:"usa-checkbox__input"}} + {{ wizard.form.agree_check|add_label_class:"usa-checkbox__label" }} +
+
+ + {{ block.super }} + +
+ +{% endblock %} From fae6d49b024cd22714d6b07cd234d7a0012128a8 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 17:15:15 -0500 Subject: [PATCH 21/50] Change next button to submit on last page --- src/registrar/templates/application_form.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/application_form.html index f49b288c7..a164d4d35 100644 --- a/src/registrar/templates/application_form.html +++ b/src/registrar/templates/application_form.html @@ -17,8 +17,13 @@ {% endif %}

{{form_titles|get_item:wizard.steps.current}}

{% block form_content %} - - + {% if wizard.steps.next %} + + + {% else %} + + + {% endif %} {% endblock %}
From 74c11cc231c71fa4e1313792112880f1abe64f45 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Tue, 8 Nov 2022 18:29:46 -0500 Subject: [PATCH 22/50] Add review view --- src/registrar/forms/application_wizard.py | 6 +++++ src/registrar/templates/application_form.html | 2 +- .../templates/application_review.html | 24 +++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/registrar/templates/application_review.html diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index c861c8627..5d25eb8fe 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -138,6 +138,9 @@ class AnythingElseForm(forms.Form): class RequirementsForm(forms.Form): agree_check = forms.BooleanField(label="I read and agree to the .gov domain requirements.") +class ReviewForm(forms.Form): + pass + # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass FORMS = [ @@ -152,6 +155,7 @@ FORMS = [ ("security_email", SecurityEmailForm), ("anything_else", AnythingElseForm), ("requirements", RequirementsForm), + ("review", ReviewForm), ] # Dict to match up the right template with the right step. Keys here must @@ -168,6 +172,7 @@ TEMPLATES = { "security_email": "application_security_email.html", "anything_else": "application_anything_else.html", "requirements": "application_requirements.html", + "review": "application_review.html", } # We need to pass our page titles as context to the templates, indexed @@ -184,6 +189,7 @@ TITLES = { "security_email": "Security email for public use", "anything_else": "Anything else we should know?", "requirements": "Requirements for registration and operation of .gov domains", + "review": "Review and submit your domain request", } diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/application_form.html index a164d4d35..1740b3b05 100644 --- a/src/registrar/templates/application_form.html +++ b/src/registrar/templates/application_form.html @@ -21,7 +21,7 @@ {% else %} - + {% endif %} {% endblock %} diff --git a/src/registrar/templates/application_review.html b/src/registrar/templates/application_review.html new file mode 100644 index 000000000..1dbfce822 --- /dev/null +++ b/src/registrar/templates/application_review.html @@ -0,0 +1,24 @@ + +{% extends 'application_form.html' %} +{% load static widget_tweaks %} + +{% block form_content %} + +
+ {% for this_step in wizard.steps.all|slice:":-1" %} +
+
+ {{ form_titles|get_item:this_step }} + Edit +
+
+ <Answer value> +
+
+ {% endfor %} + + {{ block.super }} + +
+ +{% endblock %} From fb4968cc17c5842dd91199360f7481f8a0d2fba7 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Wed, 9 Nov 2022 12:33:47 -0500 Subject: [PATCH 23/50] Change back to link, limit scope of if on submit button --- src/registrar/templates/application_form.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/application_form.html index 1740b3b05..51560720a 100644 --- a/src/registrar/templates/application_form.html +++ b/src/registrar/templates/application_form.html @@ -9,21 +9,20 @@
{% if wizard.steps.prev %} - + {% endif %}

{{form_titles|get_item:wizard.steps.current}}

{% block form_content %} {% if wizard.steps.next %} - - + {% else %} - - + {% endif %} + {% endblock %}
From ba2de84ff9504edbe6e978aa6e3c86741ae1f53a Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Wed, 9 Nov 2022 16:52:39 -0500 Subject: [PATCH 24/50] Change org type button to usa-radio style --- src/registrar/forms/application_wizard.py | 2 +- .../templates/application_organization.html | 36 ++++++++++++------- .../templates/includes/radio_button.html | 14 ++++---- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 5d25eb8fe..a9a14ea35 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -57,7 +57,7 @@ class OrganizationForm(forms.Form): ("Yes", "Yes"), ("No", "No"), ], - widget=forms.RadioSelect, + widget=forms.RadioSelect(attrs={"class":"usa-radio__input"}), ) diff --git a/src/registrar/templates/application_organization.html b/src/registrar/templates/application_organization.html index 4c562d96c..0775540a9 100644 --- a/src/registrar/templates/application_organization.html +++ b/src/registrar/templates/application_organization.html @@ -12,37 +12,49 @@ {% radio_buttons_by_value wizard.form.organization_type as choices %}
- +

What kind of government organization do you represent?

{{ wizard.form.organization_type.errors }} - {% include "includes/radio_button.html" with choice=choices.Federal %} - {% include "includes/radio_button.html" with choice=choices.Interstate %} - {% include "includes/radio_button.html" with choice=choices.State_or_Territory %} - {% include "includes/radio_button.html" with choice=choices.Tribal %} - {% include "includes/radio_button.html" with choice=choices.County %} - {% include "includes/radio_button.html" with choice=choices.City %} - {% include "includes/radio_button.html" with choice=choices.Special_District %} + {% include "includes/radio_button.html" with choice=choices.Federal tile="true" %} + {% include "includes/radio_button.html" with choice=choices.Interstate tile="true" %} + {% include "includes/radio_button.html" with choice=choices.State_or_Territory tile="true" %} + {% include "includes/radio_button.html" with choice=choices.Tribal tile="true" %} + {% include "includes/radio_button.html" with choice=choices.County tile="true" %} + {% include "includes/radio_button.html" with choice=choices.City tile="true" %} + {% include "includes/radio_button.html" with choice=choices.Special_District tile="true" %}
- +

Which federal branch does your organization belong to?

- {{ wizard.form.federal_type|add_class:"usa-radio" }} + {% radio_buttons_by_value wizard.form.federal_type as federal_choices %} + {% include "includes/radio_button.html" with choice=federal_choices.Executive%} + {% include "includes/radio_button.html" with choice=federal_choices.Judicial%} + {% include "includes/radio_button.html" with choice=federal_choices.Legislative%}
- +

Is your organization an election office?

- {{ wizard.form.is_election_board|add_class:"usa-radio" }} + {% for radio in wizard.form.is_election_board %} +
+ {{radio.tag}} + +
+ {% endfor %} + +
{{ block.super }} diff --git a/src/registrar/templates/includes/radio_button.html b/src/registrar/templates/includes/radio_button.html index 8f43547dd..85f64b831 100644 --- a/src/registrar/templates/includes/radio_button.html +++ b/src/registrar/templates/includes/radio_button.html @@ -1,14 +1,14 @@ -
- -
\ No newline at end of file + + From fd04118bcb47092dbde3828c79bc34b1db28934f Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Wed, 9 Nov 2022 17:55:27 -0500 Subject: [PATCH 25/50] Resize sidebar --- src/registrar/templates/application_form.html | 2 +- src/registrar/templates/application_sidebar.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/application_form.html index 51560720a..8730cf098 100644 --- a/src/registrar/templates/application_form.html +++ b/src/registrar/templates/application_form.html @@ -3,7 +3,7 @@ {% block title %}Apply for a .gov domain – {{form_titles|get_item:wizard.steps.current}}{% endblock %} {% block content %} -
+
{% include 'application_sidebar.html' %}
diff --git a/src/registrar/templates/application_sidebar.html b/src/registrar/templates/application_sidebar.html index be713bbe8..564158756 100644 --- a/src/registrar/templates/application_sidebar.html +++ b/src/registrar/templates/application_sidebar.html @@ -1,4 +1,4 @@ -
+
+

Alternative domains

@@ -64,6 +66,8 @@
+

If you’re not sure this is the domain you want, that’s okay. You can change it later.

+ {{ block.super }} diff --git a/src/registrar/templates/application_org_contact.html b/src/registrar/templates/application_org_contact.html index eeb4943dd..2c866e662 100644 --- a/src/registrar/templates/application_org_contact.html +++ b/src/registrar/templates/application_org_contact.html @@ -6,10 +6,14 @@

What is the name and mailing address of your organization?

-

Enter the name of the organization your represent. Your organization might be part -of a larger entity. If so, enter information about your part of the larger entity.

+
+

Enter the name of the organization your represent. Your organization might be part + of a larger entity. If so, enter information about your part of the larger entity.

-

All fields are required unless they are marked optional.

+

Once your domain is approved, the name of your organization will be publicly listed as the domain registrant.

+ +

All fields are required unless they are marked optional.

+
{{ wizard.management_form }} diff --git a/src/registrar/templates/application_other_contacts.html b/src/registrar/templates/application_other_contacts.html index 5882710e5..352650655 100644 --- a/src/registrar/templates/application_other_contacts.html +++ b/src/registrar/templates/application_other_contacts.html @@ -12,6 +12,7 @@ {{ wizard.management_form }} {% csrf_token %} +

Contact 2

{{ wizard.form.given_name|add_label_class:"usa-label" }} {{ wizard.form.given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index 6b98d06f5..5d3a84b22 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -4,9 +4,7 @@ {% block form_content %} -

Explain how you plan to use this domain. Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)?Read about activities that are prohibited on .gov domains.

- -

All fields are required unless they are marked optional.

+

Describe your organization’s mission or the reason for your domain request. Explain how you plan to use this domain. Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)? Read about activities that are prohibited on .gov domains.

From f7c7c78d2fccf568d205482385c8de18d0389032 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 10 Nov 2022 10:46:34 -0500 Subject: [PATCH 27/50] Add lock icon to sidebar --- .../templates/application_sidebar.html | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/registrar/templates/application_sidebar.html b/src/registrar/templates/application_sidebar.html index 564158756..f9f7d82d9 100644 --- a/src/registrar/templates/application_sidebar.html +++ b/src/registrar/templates/application_sidebar.html @@ -1,16 +1,21 @@ +{% load static %}
-
- -

Which federal branch does your organization belong to?

-
- - {% radio_buttons_by_value wizard.form.federal_type as federal_choices %} - {% include "includes/radio_button.html" with choice=federal_choices.Executive%} - {% include "includes/radio_button.html" with choice=federal_choices.Judicial%} - {% include "includes/radio_button.html" with choice=federal_choices.Legislative%} -
- -
- -

Is your organization an election office?

-
- - {% for radio in wizard.form.is_election_board %} -
- {{radio.tag}} - -
- {% endfor %} - - -
- {{ block.super }} From dc4d212452f754b6205b56e7ceb47d4d3d4b7ebe Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 10 Nov 2022 16:24:01 -0500 Subject: [PATCH 30/50] Move example text into a separate includes --- .../application_authorizing_official.html | 2 +- .../templates/application_dotgov_domain.html | 16 +--------------- .../templates/includes/ao_example__city.html | 1 + .../templates/includes/domain_example__city.html | 15 +++++++++++++++ 4 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 src/registrar/templates/includes/ao_example__city.html create mode 100644 src/registrar/templates/includes/domain_example__city.html diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 9442711d9..a3458ed90 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -12,7 +12,7 @@

-

Domain requests from cities must be authorized by the mayor or the equivalent highest elected official.

+ {% include "includes/ao_example__city.html" %}

We’ll contact your authorizing official to let them know that you made this request and to double check that they approve it.

diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index 368183d7b..7b0d0700d 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -18,21 +18,7 @@

Here are a few domain examples for your type of organization.

-

Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.

-

Examples: -

    -
  • www.BlufftonIndiana.gov
  • -
  • www.CityofEudoraKS.gov
  • -
  • www.WallawallaWA.gov
  • -
-

-

Some cities don’t have to refer to their state. -

    -
  • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
  • -
  • Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.
  • -
  • The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that don’t refer to their state.
  • -
-

+ {% include "includes/domain_example__city.html" %}
diff --git a/src/registrar/templates/includes/ao_example__city.html b/src/registrar/templates/includes/ao_example__city.html new file mode 100644 index 000000000..cfb558376 --- /dev/null +++ b/src/registrar/templates/includes/ao_example__city.html @@ -0,0 +1 @@ +

Domain requests from cities must be authorized by the mayor or the equivalent highest elected official.

diff --git a/src/registrar/templates/includes/domain_example__city.html b/src/registrar/templates/includes/domain_example__city.html new file mode 100644 index 000000000..438ea005d --- /dev/null +++ b/src/registrar/templates/includes/domain_example__city.html @@ -0,0 +1,15 @@ +

Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.

+

Examples: +

    +
  • www.BlufftonIndiana.gov
  • +
  • www.CityofEudoraKS.gov
  • +
  • www.WallawallaWA.gov
  • +
+

+

Some cities don’t have to refer to their state. +

    +
  • City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureau’s National Places Gazetteer Files to determine if names are unique.
  • +
  • Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.
  • +
  • The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that don’t refer to their state.
  • +
+

From d4b888d9a1e23fef2a414afd5d399416e3870900 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 10 Nov 2022 16:26:34 -0500 Subject: [PATCH 31/50] Make label for large textarea sr only --- src/registrar/templates/application_anything_else.html | 2 +- src/registrar/templates/application_purpose.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/application_anything_else.html b/src/registrar/templates/application_anything_else.html index 471b1f47a..153d547e2 100644 --- a/src/registrar/templates/application_anything_else.html +++ b/src/registrar/templates/application_anything_else.html @@ -12,7 +12,7 @@ {% csrf_token %}
- {{ wizard.form.anything_else|add_label_class:"usa-label" }} + {{ wizard.form.anything_else|add_label_class:"usa-label usa-sr-only" }} {{ wizard.form.anything_else|add_class:"usa-textarea usa-character-count__field"|attr:"aria-describedby:instructions"|attr:"maxlength=500" }} You can enter up to 500 characters
diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index 5d3a84b22..b890ae0e1 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -12,7 +12,7 @@ {% csrf_token %}
- {{ wizard.form.purpose_field|add_label_class:"usa-label" }} + {{ wizard.form.purpose_field|add_label_class:"usa-label usa-sr-only" }} {{ wizard.form.purpose_field|add_class:"usa-textarea usa-character-count__field"|attr:"aria-describedby:instructions"|attr:"maxlength=500" }} You can enter up to 500 characters
From aad03f9bf4c1148e71b36ff6c201685647dda425 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 10 Nov 2022 16:46:25 -0500 Subject: [PATCH 32/50] Autoformat with black linter --- src/registrar/forms/application_wizard.py | 134 +++++++++++++++++----- 1 file changed, 104 insertions(+), 30 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 46c0a94b8..7c4d54a2d 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -11,11 +11,13 @@ from formtools.wizard.views import NamedUrlSessionWizardView # type: ignore logger = logging.getLogger(__name__) + class RegistrarForm(forms.Form): def __init__(self, *args, **kwargs): - kwargs.setdefault('label_suffix', '') + kwargs.setdefault("label_suffix", "") super(RegistrarForm, self).__init__(*args, **kwargs) + class OrganizationForm(RegistrarForm): organization_type = forms.ChoiceField( required=True, @@ -61,9 +63,10 @@ class OrganizationForm(RegistrarForm): ("Yes", "Yes"), ("No", "No"), ], - widget=forms.RadioSelect(attrs={"class":"usa-radio__input"}), + widget=forms.RadioSelect(attrs={"class": "usa-radio__input"}), ) + class OrganizationFederalForm(RegistrarForm): federal_type = forms.ChoiceField( required=False, @@ -75,6 +78,7 @@ class OrganizationFederalForm(RegistrarForm): widget=forms.RadioSelect, ) + class OrganizationElectionForm(RegistrarForm): is_election_board = forms.ChoiceField( required=False, @@ -85,86 +89,156 @@ class OrganizationElectionForm(RegistrarForm): widget=forms.RadioSelect(), ) + class OrgContactForm(RegistrarForm): organization_name = forms.CharField(label="Organization Name") address_line1 = forms.CharField(label="Address line 1") address_line2 = forms.CharField( - required=False, - label="Address line 2", - ) + required=False, + label="Address line 2", + ) us_state = forms.ChoiceField( - label="State", - choices=[('AL', 'Alabama'), ('AK', 'Alaska'), ('AZ', 'Arizona'), ('AR', 'Arkansas'), ('CA', 'California'), ('CO', 'Colorado'), ('CT', 'Connecticut'), ('DE', 'Delaware'), ('DC', 'District of Columbia'), ('FL', 'Florida'), ('GA', 'Georgia'), ('HI', 'Hawaii'), ('ID', 'Idaho'), ('IL', 'Illinois'), ('IN', 'Indiana'), ('IA', 'Iowa'), ('KS', 'Kansas'), ('KY', 'Kentucky'), ('LA', 'Louisiana'), ('ME', 'Maine'), ('MD', 'Maryland'), ('MA', 'Massachusetts'), ('MI', 'Michigan'), ('MN', 'Minnesota'), ('MS', 'Mississippi'), ('MO', 'Missouri'), ('MT', 'Montana'), ('NE', 'Nebraska'), ('NV', 'Nevada'), ('NH', 'New Hampshire'), ('NJ', 'New Jersey'), ('NM', 'New Mexico'), ('NY', 'New York'), ('NC', 'North Carolina'), ('ND', 'North Dakota'), ('OH', 'Ohio'), ('OK', 'Oklahoma'), ('OR', 'Oregon'), ('PA', 'Pennsylvania'), ('RI', 'Rhode Island'), ('SC', 'South Carolina'), ('SD', 'South Dakota'), ('TN', 'Tennessee'), ('TX', 'Texas'), ('UT', 'Utah'), ('VT', 'Vermont'), ('VA', 'Virginia'), ('WA', 'Washington'), ('WV', 'West Virginia'), ('WI', 'Wisconsin'), ('WY', 'Wyoming'), ('AS', 'American Samoa'), ('GU', 'Guam'), ('MP', 'Northern Mariana Islands'), ('PR', 'Puerto Rico'), ('VI', 'Virgin Islands'),], - ) + label="State", + choices=[ + ("AL", "Alabama"), + ("AK", "Alaska"), + ("AZ", "Arizona"), + ("AR", "Arkansas"), + ("CA", "California"), + ("CO", "Colorado"), + ("CT", "Connecticut"), + ("DE", "Delaware"), + ("DC", "District of Columbia"), + ("FL", "Florida"), + ("GA", "Georgia"), + ("HI", "Hawaii"), + ("ID", "Idaho"), + ("IL", "Illinois"), + ("IN", "Indiana"), + ("IA", "Iowa"), + ("KS", "Kansas"), + ("KY", "Kentucky"), + ("LA", "Louisiana"), + ("ME", "Maine"), + ("MD", "Maryland"), + ("MA", "Massachusetts"), + ("MI", "Michigan"), + ("MN", "Minnesota"), + ("MS", "Mississippi"), + ("MO", "Missouri"), + ("MT", "Montana"), + ("NE", "Nebraska"), + ("NV", "Nevada"), + ("NH", "New Hampshire"), + ("NJ", "New Jersey"), + ("NM", "New Mexico"), + ("NY", "New York"), + ("NC", "North Carolina"), + ("ND", "North Dakota"), + ("OH", "Ohio"), + ("OK", "Oklahoma"), + ("OR", "Oregon"), + ("PA", "Pennsylvania"), + ("RI", "Rhode Island"), + ("SC", "South Carolina"), + ("SD", "South Dakota"), + ("TN", "Tennessee"), + ("TX", "Texas"), + ("UT", "Utah"), + ("VT", "Vermont"), + ("VA", "Virginia"), + ("WA", "Washington"), + ("WV", "West Virginia"), + ("WI", "Wisconsin"), + ("WY", "Wyoming"), + ("AS", "American Samoa"), + ("GU", "Guam"), + ("MP", "Northern Mariana Islands"), + ("PR", "Puerto Rico"), + ("VI", "Virgin Islands"), + ], + ) zipcode = forms.CharField(label="ZIP code") + class AuthorizingOfficialForm(RegistrarForm): given_name = forms.CharField(label="First name/given name") middle_name = forms.CharField( - required=False, - label="Middle name (optional)", - ) + required=False, + label="Middle name (optional)", + ) family_name = forms.CharField(label="Last name/family name") title = forms.CharField(label="Title or role in your organization") email = forms.EmailField(label="Email") phone = forms.CharField(label="Phone") + class CurrentSitesForm(RegistrarForm): current_site = forms.CharField( - required=False, - label="Enter your organization’s public website, if you have one. For example, www.city.com.") + required=False, + label="Enter your organization’s public website, if you have one. For example, www.city.com.", + ) + class DotGovDomainForm(RegistrarForm): dotgov_domain = forms.CharField(label="What .gov domain do you want?") alternative_domain = forms.CharField( - required = False, - label="Are there other domains you’d like if we can’t give you your first choice? Entering alternative domains is optional.", - ) + required=False, + label="Are there other domains you’d like if we can’t give you your first choice? Entering alternative domains is optional.", + ) + class PurposeForm(RegistrarForm): purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea()) + class YourContactForm(RegistrarForm): given_name = forms.CharField(label="First name/given name") middle_name = forms.CharField( - required=False, - label="Middle name (optional)", - ) + required=False, + label="Middle name (optional)", + ) family_name = forms.CharField(label="Last name/family name") title = forms.CharField(label="Title or role in your organization") email = forms.EmailField(label="Email") phone = forms.CharField(label="Phone") + class OtherContactsForm(RegistrarForm): given_name = forms.CharField(label="First name/given name") middle_name = forms.CharField( - required=False, - label="Middle name (optional)", - ) + required=False, + label="Middle name (optional)", + ) family_name = forms.CharField(label="Last name/family name") title = forms.CharField(label="Title or role in your organization") email = forms.EmailField(label="Email") phone = forms.CharField(label="Phone") + class SecurityEmailForm(RegistrarForm): email = forms.EmailField( - required=False, - label="Security email", - ) + required=False, + label="Security email", + ) + class AnythingElseForm(RegistrarForm): anything_else = forms.CharField( - required=False, - label="Anything else we should know", - widget=forms.Textarea() - ) + required=False, label="Anything else we should know", widget=forms.Textarea() + ) + class RequirementsForm(RegistrarForm): - agree_check = forms.BooleanField(label="I read and agree to the .gov domain requirements.") + agree_check = forms.BooleanField( + label="I read and agree to the .gov domain requirements." + ) + class ReviewForm(RegistrarForm): pass + # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass FORMS = [ From 7495dba7428397bbb33b5edfcbdfa05071c6c8ff Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 14 Nov 2022 12:29:29 -0500 Subject: [PATCH 33/50] Remove leading slash from static img --- src/registrar/templates/application_dotgov_domain.html | 2 +- src/registrar/templates/application_form.html | 2 +- src/registrar/templates/application_sidebar.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index 7b0d0700d..abe3e774b 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -47,7 +47,7 @@
diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/application_form.html index 3d246f7aa..2977eaac2 100644 --- a/src/registrar/templates/application_form.html +++ b/src/registrar/templates/application_form.html @@ -13,7 +13,7 @@ {% if wizard.steps.prev %} Previous step {% endif %} diff --git a/src/registrar/templates/application_sidebar.html b/src/registrar/templates/application_sidebar.html index fef88396c..aea0b938a 100644 --- a/src/registrar/templates/application_sidebar.html +++ b/src/registrar/templates/application_sidebar.html @@ -14,7 +14,7 @@ {{ form_titles|get_item:this_step }} locked until previous steps have been completed - + {% endif %} {% endfor %} From 8f0933c9afe00c40a858491d4fb2147358752a46 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 14 Nov 2022 13:05:50 -0500 Subject: [PATCH 34/50] Update tests language to match content --- src/registrar/tests/test_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index 0c3c00b2c..0077d4b21 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -64,7 +64,7 @@ class LoggedInTests(TestWithUser): def test_application_form_view(self): response = self.client.get("/register/", follow=True) - self.assertContains(response, "About your organization") + self.assertContains(response, "What kind of government organization do you represent?") class FormTests(TestWithUser, WebTest): @@ -84,7 +84,7 @@ class FormTests(TestWithUser, WebTest): page = self.app.get(reverse("application")).follow() # submitting should get back the same page if the required field is empty result = page.form.submit() - self.assertIn("About your organization", result) + self.assertIn("What kind of government organization do you represent?", result) def test_application_form_organization(self): # 302 redirect to the first form From 92a8a70c3c5bb1c6388c9494e6bb2a20d3527de1 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 14 Nov 2022 13:06:17 -0500 Subject: [PATCH 35/50] Change locked step from id to class --- src/registrar/templates/application_sidebar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_sidebar.html b/src/registrar/templates/application_sidebar.html index aea0b938a..2869e7d14 100644 --- a/src/registrar/templates/application_sidebar.html +++ b/src/registrar/templates/application_sidebar.html @@ -13,7 +13,7 @@
  • {{ form_titles|get_item:this_step }} - locked until previous steps have been completed + locked until previous steps have been completed {% endif %}
  • From edfba9e5bd1d2c220cac990df34f702c14b3c7b4 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 14 Nov 2022 13:19:28 -0500 Subject: [PATCH 36/50] SVG icon should be an id after all --- src/registrar/templates/application_sidebar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/application_sidebar.html b/src/registrar/templates/application_sidebar.html index 2869e7d14..33e06812f 100644 --- a/src/registrar/templates/application_sidebar.html +++ b/src/registrar/templates/application_sidebar.html @@ -13,7 +13,7 @@
  • {{ form_titles|get_item:this_step }} - locked until previous steps have been completed + locked until previous steps have been completed {% endif %}
  • From 776ecae30f00ed77b559242878fdfa451ef62cd2 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 14 Nov 2022 15:51:18 -0500 Subject: [PATCH 37/50] Fix line length linting error, add expaliner comment --- src/registrar/forms/application_wizard.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 7c4d54a2d..16f8666ab 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -12,6 +12,7 @@ from formtools.wizard.views import NamedUrlSessionWizardView # type: ignore logger = logging.getLogger(__name__) +# Subclass used to remove the default colon suffix from all fields class RegistrarForm(forms.Form): def __init__(self, *args, **kwargs): kwargs.setdefault("label_suffix", "") @@ -176,7 +177,8 @@ class AuthorizingOfficialForm(RegistrarForm): class CurrentSitesForm(RegistrarForm): current_site = forms.CharField( required=False, - label="Enter your organization’s public website, if you have one. For example, www.city.com.", + label="Enter your organization’s public website, if you have one. For example, " + "www.city.com.", ) @@ -184,7 +186,8 @@ class DotGovDomainForm(RegistrarForm): dotgov_domain = forms.CharField(label="What .gov domain do you want?") alternative_domain = forms.CharField( required=False, - label="Are there other domains you’d like if we can’t give you your first choice? Entering alternative domains is optional.", + label="Are there other domains you’d like if we can’t give you your first " + "choice? Entering alternative domains is optional.", ) From 68153dd4e1bc7f86151cf0d4d00613ed67cd5372 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 14 Nov 2022 16:26:57 -0500 Subject: [PATCH 38/50] Add legends to all fieldsets --- .../application_authorizing_official.html | 15 +++++++++------ .../templates/application_org_contact.html | 7 ++++--- .../templates/application_org_election.html | 4 +++- .../templates/application_org_federal.html | 4 +++- .../templates/application_other_contacts.html | 4 +++- .../templates/application_your_contact.html | 3 +++ 6 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index a3458ed90..711d1bc00 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -25,23 +25,26 @@ {% csrf_token %}
    + + Who is the authorizing official for your organization + {{ wizard.form.given_name|add_label_class:"usa-label" }} - {{ wizard.form.given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.given_name|add_class:"usa-input"}} {{ wizard.form.middle_name|add_label_class:"usa-label" }} - {{ wizard.form.middle_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.middle_name|add_class:"usa-input"}} {{ wizard.form.family_name|add_label_class:"usa-label" }} - {{ wizard.form.family_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.family_name|add_class:"usa-input"}} {{ wizard.form.title|add_label_class:"usa-label" }} - {{ wizard.form.title|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.title|add_class:"usa-input"}} {{ wizard.form.email|add_label_class:"usa-label" }} - {{ wizard.form.email|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.email|add_class:"usa-input"}} {{ wizard.form.phone|add_label_class:"usa-label" }} - {{ wizard.form.phone|add_class:"usa-input usa-input--medium"|attr:"aria-describedby:instructions" }} + {{ wizard.form.phone|add_class:"usa-input usa-input--medium" }}
    diff --git a/src/registrar/templates/application_org_contact.html b/src/registrar/templates/application_org_contact.html index 2c866e662..a879bd126 100644 --- a/src/registrar/templates/application_org_contact.html +++ b/src/registrar/templates/application_org_contact.html @@ -4,6 +4,7 @@ {% block form_content %} +

    What is the name and mailing address of your organization?

    @@ -19,10 +20,10 @@ {{ wizard.management_form }} {% csrf_token %} - {{ wizard.form.organization_name|add_label_class:"usa-label" }} - {{ wizard.form.organization_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} -
    + What is the name and mailing address of your organization? + {{ wizard.form.organization_name|add_label_class:"usa-label" }} + {{ wizard.form.organization_name|add_class:"usa-input" }} {{ wizard.form.address_line1|add_label_class:"usa-label" }} {{ wizard.form.address_line1|add_class:"usa-input" }} {{ wizard.form.address_line2|add_label_class:"usa-label" }} diff --git a/src/registrar/templates/application_org_election.html b/src/registrar/templates/application_org_election.html index 8768a78a0..6d8d2187b 100644 --- a/src/registrar/templates/application_org_election.html +++ b/src/registrar/templates/application_org_election.html @@ -8,8 +8,10 @@ {{ wizard.management_form }} {% csrf_token %} -

    Is your organization an election office?

    + +

    Is your organization an election office?

    +
    {% radio_buttons_by_value wizard.form.is_election_board as choices %} {% include "includes/radio_button.html" with choice=choices.Yes%} {% include "includes/radio_button.html" with choice=choices.No%} diff --git a/src/registrar/templates/application_org_federal.html b/src/registrar/templates/application_org_federal.html index 8037aadd6..d10b2c442 100644 --- a/src/registrar/templates/application_org_federal.html +++ b/src/registrar/templates/application_org_federal.html @@ -8,8 +8,10 @@ {{ wizard.management_form }} {% csrf_token %} -

    Which federal branch is your organization in?

    + +

    Which federal branch is your organization in?

    +
    {% radio_buttons_by_value wizard.form.federal_type as federal_choices %} {% include "includes/radio_button.html" with choice=federal_choices.Executive%} {% include "includes/radio_button.html" with choice=federal_choices.Judicial%} diff --git a/src/registrar/templates/application_other_contacts.html b/src/registrar/templates/application_other_contacts.html index 352650655..74929b92e 100644 --- a/src/registrar/templates/application_other_contacts.html +++ b/src/registrar/templates/application_other_contacts.html @@ -12,8 +12,10 @@ {{ wizard.management_form }} {% csrf_token %} -

    Contact 2

    + +

    Contact 2

    +
    {{ wizard.form.given_name|add_label_class:"usa-label" }} {{ wizard.form.given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} diff --git a/src/registrar/templates/application_your_contact.html b/src/registrar/templates/application_your_contact.html index e9d70daaa..a04af6278 100644 --- a/src/registrar/templates/application_your_contact.html +++ b/src/registrar/templates/application_your_contact.html @@ -20,6 +20,9 @@ {% csrf_token %}
    + + Your contact information + {{ wizard.form.given_name|add_label_class:"usa-label" }} {{ wizard.form.given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} From 9aa5ee833809c01cca6e536864a85d9821d93daf Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 14 Nov 2022 16:27:19 -0500 Subject: [PATCH 39/50] Add new pages to pa11y url list --- src/.pa11yci | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/.pa11yci b/src/.pa11yci index f93601af9..b5eae68b5 100644 --- a/src/.pa11yci +++ b/src/.pa11yci @@ -4,5 +4,19 @@ "http://app:8080/health/", "http://app:8080/whoami/", "http://app:8080/register/" + "http://app:8080/register/organization.html" + "http://app:8080/register/org_federal.html" + "http://app:8080/register/org_election.html" + "http://app:8080/register/org_contact.html" + "http://app:8080/register/authorizing_official.html" + "http://app:8080/register/current_sites.html" + "http://app:8080/register/dotgov_domain.html" + "http://app:8080/register/purpose.html" + "http://app:8080/register/your_contact.html" + "http://app:8080/register/other_contacts.html" + "http://app:8080/register/security_email.html" + "http://app:8080/register/anything_else.html" + "http://app:8080/register/requirements.html" + "http://app:8080/register/review.html" ] } From 593701827be450dd215a4c62a8d562436016cccb Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 14 Nov 2022 16:41:44 -0500 Subject: [PATCH 40/50] Fix fomratting errors --- src/.pa11yci | 28 ++++++++++++++-------------- src/registrar/tests/test_views.py | 4 +++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/.pa11yci b/src/.pa11yci index b5eae68b5..9ee963124 100644 --- a/src/.pa11yci +++ b/src/.pa11yci @@ -4,19 +4,19 @@ "http://app:8080/health/", "http://app:8080/whoami/", "http://app:8080/register/" - "http://app:8080/register/organization.html" - "http://app:8080/register/org_federal.html" - "http://app:8080/register/org_election.html" - "http://app:8080/register/org_contact.html" - "http://app:8080/register/authorizing_official.html" - "http://app:8080/register/current_sites.html" - "http://app:8080/register/dotgov_domain.html" - "http://app:8080/register/purpose.html" - "http://app:8080/register/your_contact.html" - "http://app:8080/register/other_contacts.html" - "http://app:8080/register/security_email.html" - "http://app:8080/register/anything_else.html" - "http://app:8080/register/requirements.html" - "http://app:8080/register/review.html" + "http://app:8080/register/organization.html", + "http://app:8080/register/org_federal.html", + "http://app:8080/register/org_election.html", + "http://app:8080/register/org_contact.html", + "http://app:8080/register/authorizing_official.html", + "http://app:8080/register/current_sites.html", + "http://app:8080/register/dotgov_domain.html", + "http://app:8080/register/purpose.html", + "http://app:8080/register/your_contact.html", + "http://app:8080/register/other_contacts.html", + "http://app:8080/register/security_email.html", + "http://app:8080/register/anything_else.html", + "http://app:8080/register/requirements.html", + "http://app:8080/register/review.html", ] } diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index 0077d4b21..b21aab6cf 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -64,7 +64,9 @@ class LoggedInTests(TestWithUser): def test_application_form_view(self): response = self.client.get("/register/", follow=True) - self.assertContains(response, "What kind of government organization do you represent?") + self.assertContains( + response, "What kind of government organization do you represent?" + ) class FormTests(TestWithUser, WebTest): From 5a3fa018ae90cea7ca2bcedc0731fb55c9179e5f Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 14 Nov 2022 16:47:00 -0500 Subject: [PATCH 41/50] Adding missing comma to pa11y list --- src/.pa11yci | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/.pa11yci b/src/.pa11yci index 9ee963124..cc4e79190 100644 --- a/src/.pa11yci +++ b/src/.pa11yci @@ -3,7 +3,7 @@ "http://app:8080/", "http://app:8080/health/", "http://app:8080/whoami/", - "http://app:8080/register/" + "http://app:8080/register/", "http://app:8080/register/organization.html", "http://app:8080/register/org_federal.html", "http://app:8080/register/org_election.html", @@ -17,6 +17,6 @@ "http://app:8080/register/security_email.html", "http://app:8080/register/anything_else.html", "http://app:8080/register/requirements.html", - "http://app:8080/register/review.html", + "http://app:8080/register/review.html" ] } From 1d6ee255e9482b2b6258e5172f9abb094fde8107 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Wed, 16 Nov 2022 12:18:02 -0500 Subject: [PATCH 42/50] Address PR comments --- src/.pa11yci | 28 ++++----- src/registrar/config/settings.py | 3 + src/registrar/forms/application_wizard.py | 57 +++++++++---------- .../application_authorizing_official.html | 8 +-- .../templates/application_org_election.html | 16 +++++- ...ization.html => application_org_type.html} | 0 .../templates/application_other_contacts.html | 8 +-- .../templates/application_your_contact.html | 8 +-- 8 files changed, 69 insertions(+), 59 deletions(-) rename src/registrar/templates/{application_organization.html => application_org_type.html} (100%) diff --git a/src/.pa11yci b/src/.pa11yci index cc4e79190..49b33779b 100644 --- a/src/.pa11yci +++ b/src/.pa11yci @@ -4,19 +4,19 @@ "http://app:8080/health/", "http://app:8080/whoami/", "http://app:8080/register/", - "http://app:8080/register/organization.html", - "http://app:8080/register/org_federal.html", - "http://app:8080/register/org_election.html", - "http://app:8080/register/org_contact.html", - "http://app:8080/register/authorizing_official.html", - "http://app:8080/register/current_sites.html", - "http://app:8080/register/dotgov_domain.html", - "http://app:8080/register/purpose.html", - "http://app:8080/register/your_contact.html", - "http://app:8080/register/other_contacts.html", - "http://app:8080/register/security_email.html", - "http://app:8080/register/anything_else.html", - "http://app:8080/register/requirements.html", - "http://app:8080/register/review.html" + "http://app:8080/register/organization/", + "http://app:8080/register/org_federal/", + "http://app:8080/register/org_election/", + "http://app:8080/register/org_contact/", + "http://app:8080/register/authorizing_official/", + "http://app:8080/register/current_sites/", + "http://app:8080/register/dotgov_domain/", + "http://app:8080/register/purpose/", + "http://app:8080/register/your_contact/", + "http://app:8080/register/other_contacts/", + "http://app:8080/register/security_email/", + "http://app:8080/register/anything_else/", + "http://app:8080/register/requirements/", + "http://app:8080/register/review/" ] } diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py index eb4eea848..86f96952a 100644 --- a/src/registrar/config/settings.py +++ b/src/registrar/config/settings.py @@ -119,6 +119,9 @@ MIDDLEWARE = [ "django.middleware.clickjacking.XFrameOptionsMiddleware", # django-csp: enable use of Content-Security-Policy header "csp.middleware.CSPMiddleware", + # DELETE ME before finishing, no login + # "registrar.tests.common.MockUserLogin" + ] # application object used by Django’s built-in servers (e.g. `runserver`) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 16f8666ab..79430e8e5 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -7,6 +7,7 @@ from django import forms from django.contrib.auth.mixins import LoginRequiredMixin from formtools.wizard.views import NamedUrlSessionWizardView # type: ignore +from registrar.models import DomainApplication logger = logging.getLogger(__name__) @@ -19,7 +20,7 @@ class RegistrarForm(forms.Form): super(RegistrarForm, self).__init__(*args, **kwargs) -class OrganizationForm(RegistrarForm): +class OrganizationTypeForm(RegistrarForm): organization_type = forms.ChoiceField( required=True, choices=[ @@ -51,11 +52,7 @@ class OrganizationForm(RegistrarForm): ) federal_type = forms.ChoiceField( required=False, - choices=[ - ("Executive", "Executive"), - ("Judicial", "Judicial"), - ("Legislative", "Legislative"), - ], + choices=DomainApplication.BRANCH_CHOICES, widget=forms.RadioSelect, ) is_election_board = forms.ChoiceField( @@ -71,27 +68,23 @@ class OrganizationForm(RegistrarForm): class OrganizationFederalForm(RegistrarForm): federal_type = forms.ChoiceField( required=False, - choices=[ - ("Executive", "Executive"), - ("Judicial", "Judicial"), - ("Legislative", "Legislative"), - ], + choices=DomainApplication.BRANCH_CHOICES, widget=forms.RadioSelect, ) class OrganizationElectionForm(RegistrarForm): - is_election_board = forms.ChoiceField( - required=False, - choices=[ - ("Yes", "Yes"), - ("No", "No"), - ], - widget=forms.RadioSelect(), + is_election_board = forms.BooleanField( + widget=forms.RadioSelect( + choices=[ + (True, "Yes"), + (False, "No"), + ], + ) ) -class OrgContactForm(RegistrarForm): +class OrganizationContactForm(RegistrarForm): organization_name = forms.CharField(label="Organization Name") address_line1 = forms.CharField(label="Address line 1") address_line2 = forms.CharField( @@ -163,12 +156,12 @@ class OrgContactForm(RegistrarForm): class AuthorizingOfficialForm(RegistrarForm): - given_name = forms.CharField(label="First name/given name") + first_name = forms.CharField(label="First name/given name") middle_name = forms.CharField( required=False, label="Middle name (optional)", ) - family_name = forms.CharField(label="Last name/family name") + last_name = forms.CharField(label="Last name/family name") title = forms.CharField(label="Title or role in your organization") email = forms.EmailField(label="Email") phone = forms.CharField(label="Phone") @@ -196,24 +189,24 @@ class PurposeForm(RegistrarForm): class YourContactForm(RegistrarForm): - given_name = forms.CharField(label="First name/given name") + first_name = forms.CharField(label="First name/given name") middle_name = forms.CharField( required=False, label="Middle name (optional)", ) - family_name = forms.CharField(label="Last name/family name") + last_name = forms.CharField(label="Last name/family name") title = forms.CharField(label="Title or role in your organization") email = forms.EmailField(label="Email") phone = forms.CharField(label="Phone") class OtherContactsForm(RegistrarForm): - given_name = forms.CharField(label="First name/given name") + first_name = forms.CharField(label="First name/given name") middle_name = forms.CharField( required=False, label="Middle name (optional)", ) - family_name = forms.CharField(label="Last name/family name") + last_name = forms.CharField(label="Last name/family name") title = forms.CharField(label="Title or role in your organization") email = forms.EmailField(label="Email") phone = forms.CharField(label="Phone") @@ -238,6 +231,8 @@ class RequirementsForm(RegistrarForm): ) +# Empty class for the review page which gets included as part of the form, but does not +# have any form fields itself class ReviewForm(RegistrarForm): pass @@ -245,10 +240,10 @@ class ReviewForm(RegistrarForm): # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass FORMS = [ - ("organization", OrganizationForm), + ("organization_type", OrganizationTypeForm), ("organization_federal", OrganizationFederalForm), ("organization_election", OrganizationElectionForm), - ("org_contact", OrgContactForm), + ("organization_contact", OrganizationContactForm), ("authorizing_official", AuthorizingOfficialForm), ("current_sites", CurrentSitesForm), ("dotgov_domain", DotGovDomainForm), @@ -264,10 +259,10 @@ FORMS = [ # Dict to match up the right template with the right step. Keys here must # match the first elements of the tuples in FORMS TEMPLATES = { - "organization": "application_organization.html", + "organization_type": "application_org_type.html", "organization_federal": "application_org_federal.html", "organization_election": "application_org_election.html", - "org_contact": "application_org_contact.html", + "organization_contact": "application_org_contact.html", "authorizing_official": "application_authorizing_official.html", "current_sites": "application_current_sites.html", "dotgov_domain": "application_dotgov_domain.html", @@ -283,10 +278,10 @@ TEMPLATES = { # We need to pass our page titles as context to the templates, indexed # by the step names TITLES = { - "organization": "Type of organization", + "organization_type": "Type of organization", "organization_federal": "Type of organization — Federal", "organization_election": "Type of organization — Election board", - "org_contact": "Organization name and mailing address", + "organization_contact": "Organization name and mailing address", "authorizing_official": "Authorizing official", "current_sites": "Organization website", "dotgov_domain": ".gov domain", diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/application_authorizing_official.html index 711d1bc00..70eb9d617 100644 --- a/src/registrar/templates/application_authorizing_official.html +++ b/src/registrar/templates/application_authorizing_official.html @@ -28,14 +28,14 @@ Who is the authorizing official for your organization - {{ wizard.form.given_name|add_label_class:"usa-label" }} - {{ wizard.form.given_name|add_class:"usa-input"}} + {{ wizard.form.first_name|add_label_class:"usa-label" }} + {{ wizard.form.first_name|add_class:"usa-input"}} {{ wizard.form.middle_name|add_label_class:"usa-label" }} {{ wizard.form.middle_name|add_class:"usa-input"}} - {{ wizard.form.family_name|add_label_class:"usa-label" }} - {{ wizard.form.family_name|add_class:"usa-input"}} + {{ wizard.form.last_name|add_label_class:"usa-label" }} + {{ wizard.form.last_name|add_class:"usa-input"}} {{ wizard.form.title|add_label_class:"usa-label" }} {{ wizard.form.title|add_class:"usa-input"}} diff --git a/src/registrar/templates/application_org_election.html b/src/registrar/templates/application_org_election.html index 6d8d2187b..20401c3b9 100644 --- a/src/registrar/templates/application_org_election.html +++ b/src/registrar/templates/application_org_election.html @@ -13,8 +13,20 @@

    Is your organization an election office?

    {% radio_buttons_by_value wizard.form.is_election_board as choices %} - {% include "includes/radio_button.html" with choice=choices.Yes%} - {% include "includes/radio_button.html" with choice=choices.No%} + + + + + + + + + + + + + {% include "includes/radio_button.html" with choice=choices|get_item:True %} + {% include "includes/radio_button.html" with choice=choices|get_item:False %}
    {{ block.super }} diff --git a/src/registrar/templates/application_organization.html b/src/registrar/templates/application_org_type.html similarity index 100% rename from src/registrar/templates/application_organization.html rename to src/registrar/templates/application_org_type.html diff --git a/src/registrar/templates/application_other_contacts.html b/src/registrar/templates/application_other_contacts.html index 74929b92e..d40d4e1fd 100644 --- a/src/registrar/templates/application_other_contacts.html +++ b/src/registrar/templates/application_other_contacts.html @@ -16,14 +16,14 @@

    Contact 2

    - {{ wizard.form.given_name|add_label_class:"usa-label" }} - {{ wizard.form.given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.first_name|add_label_class:"usa-label" }} + {{ wizard.form.first_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} {{ wizard.form.middle_name|add_label_class:"usa-label" }} {{ wizard.form.middle_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} - {{ wizard.form.family_name|add_label_class:"usa-label" }} - {{ wizard.form.family_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.last_name|add_label_class:"usa-label" }} + {{ wizard.form.last_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} {{ wizard.form.title|add_label_class:"usa-label" }} {{ wizard.form.title|add_class:"usa-input"|attr:"aria-describedby:instructions" }} diff --git a/src/registrar/templates/application_your_contact.html b/src/registrar/templates/application_your_contact.html index a04af6278..696f9b309 100644 --- a/src/registrar/templates/application_your_contact.html +++ b/src/registrar/templates/application_your_contact.html @@ -23,14 +23,14 @@ Your contact information - {{ wizard.form.given_name|add_label_class:"usa-label" }} - {{ wizard.form.given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.first_name|add_label_class:"usa-label" }} + {{ wizard.form.first_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} {{ wizard.form.middle_name|add_label_class:"usa-label" }} {{ wizard.form.middle_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} - {{ wizard.form.family_name|add_label_class:"usa-label" }} - {{ wizard.form.family_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} + {{ wizard.form.last_name|add_label_class:"usa-label" }} + {{ wizard.form.last_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }} {{ wizard.form.title|add_label_class:"usa-label" }} {{ wizard.form.title|add_class:"usa-input"|attr:"aria-describedby:instructions" }} From 69d18af91530ae8bf6d482594ed399320525ecb9 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Wed, 16 Nov 2022 12:43:20 -0500 Subject: [PATCH 43/50] Add main back to individual html pages (PR fix) --- src/registrar/templates/401.html | 33 ++++++++++++++-------------- src/registrar/templates/404.html | 8 ++++--- src/registrar/templates/500.html | 29 ++++++++++++------------ src/registrar/templates/home.html | 15 +++++++------ src/registrar/templates/profile.html | 32 ++++++++++++++------------- src/registrar/templates/whoami.html | 6 +++-- 6 files changed, 66 insertions(+), 57 deletions(-) diff --git a/src/registrar/templates/401.html b/src/registrar/templates/401.html index 0785da4c5..64bcec563 100644 --- a/src/registrar/templates/401.html +++ b/src/registrar/templates/401.html @@ -4,24 +4,25 @@ {% block title %}{% translate "Unauthorized" %}{% endblock %} {% block content %} -

    {% translate "Unauthorized" %}

    +
    +

    {% translate "Unauthorized" %}

    -{% if friendly_message %} -

    {{ friendly_message }}

    -{% else %} -

    {% translate "Authorization failed." %}

    -{% endif %} + {% if friendly_message %} +

    {{ friendly_message }}

    + {% else %} +

    {% translate "Authorization failed." %}

    + {% endif %} -

    +

    {% translate "Would you like to try logging in again?" %} -

    +

    -{% if log_identifier %} -

    Here's a unique identifier for this error.

    -
    {{ log_identifier }}
    -

    {% translate "Please include it if you contact us." %}

    -{% endif %} + {% if log_identifier %} +

    Here's a unique identifier for this error.

    +
    {{ log_identifier }}
    +

    {% translate "Please include it if you contact us." %}

    + {% endif %} -TODO: Content team to create a "how to contact us" footer for the error pages - -{% endblock %} \ No newline at end of file + TODO: Content team to create a "how to contact us" footer for the error pages +
    +{% endblock %} diff --git a/src/registrar/templates/404.html b/src/registrar/templates/404.html index cac4df5d0..9b791a88e 100644 --- a/src/registrar/templates/404.html +++ b/src/registrar/templates/404.html @@ -5,9 +5,11 @@ {% block title %}{% translate "Page not found" %}{% endblock %} {% block content %} +
    -

    {% translate "Page not found" %}

    +

    {% translate "Page not found" %}

    -

    {% translate "The requested page could not be found." %}

    +

    {% translate "The requested page could not be found." %}

    -{% endblock %} \ No newline at end of file +
    +{% endblock %} diff --git a/src/registrar/templates/500.html b/src/registrar/templates/500.html index 9709d004f..5fbd30d2d 100644 --- a/src/registrar/templates/500.html +++ b/src/registrar/templates/500.html @@ -4,20 +4,21 @@ {% block title %}{% translate "Server error" %}{% endblock %} {% block content %} -

    {% translate "Server Error" %}

    +
    +

    {% translate "Server Error" %}

    -{% if friendly_message %} -

    {{ friendly_message }}

    -{% else %} -

    {% translate "An internal server error occurred." %}

    -{% endif %} + {% if friendly_message %} +

    {{ friendly_message }}

    + {% else %} +

    {% translate "An internal server error occurred." %}

    + {% endif %} -{% if log_identifier %} -

    Here's a unique identifier for this error.

    -
    {{ log_identifier }}
    -

    {% translate "Please include it if you contact us." %}

    -{% endif %} + {% if log_identifier %} +

    Here's a unique identifier for this error.

    +
    {{ log_identifier }}
    +

    {% translate "Please include it if you contact us." %}

    + {% endif %} -TODO: Content team to create a "how to contact us" footer for the error pages - -{% endblock %} \ No newline at end of file + TODO: Content team to create a "how to contact us" footer for the error pages +
    +{% endblock %} diff --git a/src/registrar/templates/home.html b/src/registrar/templates/home.html index f6601d25c..2cb5a9995 100644 --- a/src/registrar/templates/home.html +++ b/src/registrar/templates/home.html @@ -14,12 +14,13 @@ {% endblock %} {% block content %} -

    This is the .gov registrar.

    - -{% if user.is_authenticated %} -

    Click here to log out.

    -{% else %} -

    Click here to log in.

    -{% endif %} +
    +

    This is the .gov registrar.

    + {% if user.is_authenticated %} +

    Click here to log out.

    + {% else %} +

    Click here to log in.

    + {% endif %} +
    {% endblock %} diff --git a/src/registrar/templates/profile.html b/src/registrar/templates/profile.html index 7539abb2f..c2c0fcfa1 100644 --- a/src/registrar/templates/profile.html +++ b/src/registrar/templates/profile.html @@ -5,22 +5,24 @@ Edit your User Profile {% endblock title %} {% block content %} - - {% csrf_token %} -
    - Your profile -

    +

    + + {% csrf_token %} +
    + Your profile +

    Required fields are marked with an asterisk (*). -

    - {% for field in profile_form %} - - {{ field }} - {% endfor %} -
    - - + >*). +

    + {% for field in profile_form %} + + {{ field }} + {% endfor %} +
    + + + {% endblock content %} + diff --git a/src/registrar/templates/whoami.html b/src/registrar/templates/whoami.html index 7fde3f786..c6e597a61 100644 --- a/src/registrar/templates/whoami.html +++ b/src/registrar/templates/whoami.html @@ -3,7 +3,9 @@ {% block title %} Hello {% endblock %} {% block content %} -

    Hello {{ user.last_name|default:"No last name given" }}, {{ user.first_name|default:"No first name given" }} <{{ user.email }}>!

    +
    +

    Hello {{ user.last_name|default:"No last name given" }}, {{ user.first_name|default:"No first name given" }} <{{ user.email }}>!

    -

    Click here to log out

    +

    Click here to log out

    +
    {% endblock %} From 34834d1681ebcc030bf5aada42a36fa8c4c5b5fc Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 17 Nov 2022 07:32:32 -0800 Subject: [PATCH 44/50] Updated test to match new field name --- src/registrar/tests/test_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index b21aab6cf..f1eed65c0 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -92,7 +92,7 @@ class FormTests(TestWithUser, WebTest): # 302 redirect to the first form page = self.app.get(reverse("application")).follow() form = page.form - form["organization-organization_type"] = "Federal" + form["organization_type-organization_type"] = "Federal" result = page.form.submit().follow() # Got the next form page self.assertIn("contact information", result) From 410172be3135e4ec831173979c92aa79e3f1594d Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 17 Nov 2022 07:33:44 -0800 Subject: [PATCH 45/50] Remove logged in setting --- src/registrar/config/settings.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py index 86f96952a..eb4eea848 100644 --- a/src/registrar/config/settings.py +++ b/src/registrar/config/settings.py @@ -119,9 +119,6 @@ MIDDLEWARE = [ "django.middleware.clickjacking.XFrameOptionsMiddleware", # django-csp: enable use of Content-Security-Policy header "csp.middleware.CSPMiddleware", - # DELETE ME before finishing, no login - # "registrar.tests.common.MockUserLogin" - ] # application object used by Django’s built-in servers (e.g. `runserver`) From d4ebe2f6313d7f663fe86187d22a16b78d9515f4 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 17 Nov 2022 13:02:19 -0800 Subject: [PATCH 46/50] Temporary comment out failing test; test is not correct --- src/registrar/tests/test_views.py | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index 2510473a7..d9a2661ff 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -97,25 +97,25 @@ class FormTests(TestWithUser, WebTest): # Got the next form page self.assertIn("contact information", result) - def test_application_form_submission(self): - """Can fill out the entire form and submit. + # def test_application_form_submission(self): + # """Can fill out the entire form and submit. - As we add additional form pages, we need to include them here to make - this test work. - """ - page = self.app.get(reverse("application")).follow() - form = page.form - form["organization-organization_type"] = "Federal" - form["organization-federal_type"] = "Executive" - result = page.form.submit().follow() - # Got the next form page - contact_form = result.form - contact_form["contact-organization_name"] = "test" - contact_form["contact-street_address"] = "100 Main Street" - result = page.form.submit() - # final submission results in a redirect - self.assertEquals(result.status_code, 302) - page = result.follow() - self.assertContains(page, "registrar") - # TODO: when we have a page that lists applications, visit it and - # make sure that the new one exists + # As we add additional form pages, we need to include them here to make + # this test work. + # """ + # page = self.app.get(reverse("application")).follow() + # form = page.form + # form["organization-organization_type"] = "Federal" + # form["organization-federal_type"] = "Executive" + # result = page.form.submit().follow() + # # Got the next form page + # contact_form = result.form + # contact_form["contact-organization_name"] = "test" + # contact_form["contact-street_address"] = "100 Main Street" + # result = page.form.submit() + # # final submission results in a redirect + # self.assertEquals(result.status_code, 302) + # page = result.follow() + # self.assertContains(page, "registrar") + # # TODO: when we have a page that lists applications, visit it and + # # make sure that the new one exists From fd4ab6d7c3b75d6997d81f4613f047144c59547c Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 17 Nov 2022 13:06:29 -0800 Subject: [PATCH 47/50] Remove unused import definition --- src/registrar/forms/application_wizard.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 910105d88..8c16122ca 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -8,7 +8,6 @@ from django.shortcuts import redirect from django.contrib.auth.mixins import LoginRequiredMixin from formtools.wizard.views import NamedUrlSessionWizardView # type: ignore -from registrar.models import DomainApplication from registrar.models import DomainApplication, Website From f7c69bf4457969f4742662f9d76040b886a9f848 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Thu, 17 Nov 2022 13:31:31 -0800 Subject: [PATCH 48/50] Clean up commented out code --- .../templates/application_org_election.html | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/registrar/templates/application_org_election.html b/src/registrar/templates/application_org_election.html index 20401c3b9..1499c1e0b 100644 --- a/src/registrar/templates/application_org_election.html +++ b/src/registrar/templates/application_org_election.html @@ -13,18 +13,6 @@

    Is your organization an election office?

    {% radio_buttons_by_value wizard.form.is_election_board as choices %} - - - - - - - - - - - - {% include "includes/radio_button.html" with choice=choices|get_item:True %} {% include "includes/radio_button.html" with choice=choices|get_item:False %}
    From 2abffa1541c9eae0c3d12cfad06bba821e259e7f Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 21 Nov 2022 13:48:11 -0800 Subject: [PATCH 49/50] Fix linting errors --- src/registrar/forms/application_wizard.py | 2 +- src/registrar/tests/test_views.py | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 9237dc701..e8b0dacef 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -329,7 +329,7 @@ class ApplicationWizard(LoginRequiredMixin, NamedUrlSessionWizardView): # organization type information organization_type_data = form_dict["organization_type"].cleaned_data application.organization_type = organization_type_data["organization_type"] - + # federal branch information federal_branch_data = form_dict["organization_federal"].cleaned_data application.federal_type = federal_branch_data["federal_type"] diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index 2e72f5c89..ee9118a82 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -106,7 +106,7 @@ class FormTests(TestWithUser, WebTest): self.assertContains(result, "contact information") def test_application_form_submission(self): - """Can fill out the entire form and submit. + """Can fill out the entire form and submit. As we add additional form pages, we need to include them here to make this test work. """ @@ -143,7 +143,9 @@ class FormTests(TestWithUser, WebTest): federal_result = federal_form.submit() self.assertEquals(federal_result.status_code, 302) - self.assertEquals(federal_result["Location"], "/register/organization_election/") + self.assertEquals( + federal_result["Location"], "/register/organization_election/" + ) # ---- ELECTION BOARD BRANCH PAGE ---- # Follow the redirect to the next form page @@ -155,7 +157,9 @@ class FormTests(TestWithUser, WebTest): election_result = election_form.submit() self.assertEquals(election_result.status_code, 302) - self.assertEquals(election_result["Location"], "/register/organization_contact/") + self.assertEquals( + election_result["Location"], "/register/organization_contact/" + ) # ---- ORG CONTACT PAGE ---- # Follow the redirect to the next form page @@ -170,7 +174,9 @@ class FormTests(TestWithUser, WebTest): org_contact_result = org_contact_form.submit() self.assertEquals(org_contact_result.status_code, 302) - self.assertEquals(org_contact_result["Location"], "/register/authorizing_official/") + self.assertEquals( + org_contact_result["Location"], "/register/authorizing_official/" + ) # ---- AUTHORIZING OFFICIAL PAGE ---- # Follow the redirect to the next form page ao_page = org_contact_result.follow() @@ -255,7 +261,9 @@ class FormTests(TestWithUser, WebTest): other_contacts_result = other_contacts_form.submit() self.assertEquals(other_contacts_result.status_code, 302) - self.assertEquals(other_contacts_result["Location"], "/register/security_email/") + self.assertEquals( + other_contacts_result["Location"], "/register/security_email/" + ) # ---- SECURITY EMAIL PAGE ---- # Follow the redirect to the next form page @@ -304,7 +312,7 @@ class FormTests(TestWithUser, WebTest): # final submission results in a redirect to the "finished" URL self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id) - review_result = review_form.submit() + review_result = review_form.submit() self.assertEquals(review_result.status_code, 302) self.assertEquals(review_result["Location"], "/register/finished/") From d7307c29e2f1f0b048415a7b052c2c530bdcee36 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 21 Nov 2022 13:55:01 -0800 Subject: [PATCH 50/50] Fix field name --- src/registrar/forms/application_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index e8b0dacef..33fe46377 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -332,7 +332,7 @@ class ApplicationWizard(LoginRequiredMixin, NamedUrlSessionWizardView): # federal branch information federal_branch_data = form_dict["organization_federal"].cleaned_data - application.federal_type = federal_branch_data["federal_type"] + application.federal_branch = federal_branch_data["federal_type"] # election board information election_board_data = form_dict["organization_election"].cleaned_data