diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 6b5cbf002..aca246a08 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -454,7 +454,7 @@ class DomainInformationAdmin(ListHeaderAdmin): "No other employees from your organization?", {"fields": ["no_other_contacts_rationale"]}, ), - ("Anything else we should know?", {"fields": ["anything_else"]}), + ("Anything else?", {"fields": ["anything_else"]}), ( "Requirements for operating .gov domains", {"fields": ["is_policy_acknowledged"]}, @@ -600,7 +600,7 @@ class DomainApplicationAdmin(ListHeaderAdmin): "No other employees from your organization?", {"fields": ["no_other_contacts_rationale"]}, ), - ("Anything else we should know?", {"fields": ["anything_else"]}), + ("Anything else?", {"fields": ["anything_else"]}), ( "Requirements for operating .gov domains", {"fields": ["is_policy_acknowledged"]}, diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 03207087f..9a8899e2b 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -244,7 +244,7 @@ class OrganizationContactForm(RegistrarForm): ) address_line2 = forms.CharField( required=False, - label="Street address line 2", + label="Street address line 2 (optional)", ) city = forms.CharField( label="City", @@ -268,7 +268,7 @@ class OrganizationContactForm(RegistrarForm): ) urbanization = forms.CharField( required=False, - label="Urbanization (Puerto Rico only)", + label="Urbanization (required for Puerto Rico only)", ) def clean_federal_agency(self): @@ -331,7 +331,7 @@ class AuthorizingOfficialForm(RegistrarForm): ) middle_name = forms.CharField( required=False, - label="Middle name", + label="Middle name (optional)", ) last_name = forms.CharField( label="Last name / family name", @@ -407,7 +407,7 @@ class AlternativeDomainForm(RegistrarForm): alternative_domain = forms.CharField( required=False, - label="Alternative domain", + label="", ) @@ -533,7 +533,7 @@ class YourContactForm(RegistrarForm): ) middle_name = forms.CharField( required=False, - label="Middle name", + label="Middle name (optional)", ) last_name = forms.CharField( label="Last name / family name", @@ -562,7 +562,7 @@ class OtherContactsForm(RegistrarForm): ) middle_name = forms.CharField( required=False, - label="Middle name", + label="Middle name (optional)", ) last_name = forms.CharField( label="Last name / family name", @@ -614,8 +614,8 @@ class NoOtherContactsForm(RegistrarForm): required=True, # label has to end in a space to get the label_suffix to show label=( - "Please explain why there are no other employees from your organization" - " we can contact to help us assess your eligibility for a .gov domain." + "Please explain why there are no other employees from your organization " + "we can contact to help us assess your eligibility for a .gov domain." ), widget=forms.Textarea(), ) @@ -624,7 +624,7 @@ class NoOtherContactsForm(RegistrarForm): class AnythingElseForm(RegistrarForm): anything_else = forms.CharField( required=False, - label="Anything else we should know?", + label="Anything else?", widget=forms.Textarea(), validators=[ MaxLengthValidator( diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index 39bda2f20..ff41b9268 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -181,6 +181,9 @@ class ContactForm(forms.ModelForm): for field_name in self.required: self.fields[field_name].required = True + # Set custom form label + self.fields["middle_name"].label = "Middle name (optional)" + # Set custom error messages self.fields["first_name"].error_messages = {"required": "Enter your first name / given name."} self.fields["last_name"].error_messages = {"required": "Enter your last name / family name."} @@ -220,7 +223,7 @@ class DomainSecurityEmailForm(forms.Form): """Form for adding or editing a security email to a domain.""" security_email = forms.EmailField( - label="Security email", + label="Security email (optional)", required=False, error_messages={ "invalid": str(SecurityEmailError(code=SecurityEmailErrorCodes.BAD_DATA)), diff --git a/src/registrar/migrations/0050_alter_contact_middle_name_and_more.py b/src/registrar/migrations/0050_alter_contact_middle_name_and_more.py new file mode 100644 index 000000000..4009d17d9 --- /dev/null +++ b/src/registrar/migrations/0050_alter_contact_middle_name_and_more.py @@ -0,0 +1,37 @@ +# Generated by Django 4.2.7 on 2023-11-20 20:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("registrar", "0049_alter_domainapplication_current_websites_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="contact", + name="middle_name", + field=models.TextField(blank=True, help_text="Middle name (optional)", null=True), + ), + migrations.AlterField( + model_name="domainapplication", + name="address_line2", + field=models.TextField(blank=True, help_text="Street address line 2 (optional)", null=True), + ), + migrations.AlterField( + model_name="domaininformation", + name="address_line2", + field=models.TextField( + blank=True, + help_text="Street address line 2 (optional)", + null=True, + verbose_name="Street address line 2 (optional)", + ), + ), + migrations.AlterField( + model_name="transitiondomain", + name="middle_name", + field=models.TextField(blank=True, help_text="Middle name (optional)", null=True), + ), + ] diff --git a/src/registrar/migrations/0051_alter_domainapplication_urbanization_and_more.py b/src/registrar/migrations/0051_alter_domainapplication_urbanization_and_more.py new file mode 100644 index 000000000..9b012042d --- /dev/null +++ b/src/registrar/migrations/0051_alter_domainapplication_urbanization_and_more.py @@ -0,0 +1,27 @@ +# Generated by Django 4.2.7 on 2023-11-22 20:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("registrar", "0050_alter_contact_middle_name_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="domainapplication", + name="urbanization", + field=models.TextField(blank=True, help_text="Urbanization (required for Puerto Rico only)", null=True), + ), + migrations.AlterField( + model_name="domaininformation", + name="urbanization", + field=models.TextField( + blank=True, + help_text="Urbanization (required for Puerto Rico only)", + null=True, + verbose_name="Urbanization (required for Puerto Rico only)", + ), + ), + ] diff --git a/src/registrar/migrations/0052_alter_domainapplication_anything_else_and_more.py b/src/registrar/migrations/0052_alter_domainapplication_anything_else_and_more.py new file mode 100644 index 000000000..1d5607aad --- /dev/null +++ b/src/registrar/migrations/0052_alter_domainapplication_anything_else_and_more.py @@ -0,0 +1,22 @@ +# Generated by Django 4.2.7 on 2023-11-29 19:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("registrar", "0051_alter_domainapplication_urbanization_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="domainapplication", + name="anything_else", + field=models.TextField(blank=True, help_text="Anything else?", null=True), + ), + migrations.AlterField( + model_name="domaininformation", + name="anything_else", + field=models.TextField(blank=True, help_text="Anything else?", null=True), + ), + ] diff --git a/src/registrar/models/contact.py b/src/registrar/models/contact.py index 41ed9f2c5..0a7ba4fa1 100644 --- a/src/registrar/models/contact.py +++ b/src/registrar/models/contact.py @@ -26,7 +26,7 @@ class Contact(TimeStampedModel): middle_name = models.TextField( null=True, blank=True, - help_text="Middle name", + help_text="Middle name (optional)", ) last_name = models.TextField( null=True, diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_application.py index 9ab3908d4..ebaa5f6b9 100644 --- a/src/registrar/models/domain_application.py +++ b/src/registrar/models/domain_application.py @@ -442,7 +442,7 @@ class DomainApplication(TimeStampedModel): address_line2 = models.TextField( null=True, blank=True, - help_text="Street address line 2", + help_text="Street address line 2 (optional)", ) city = models.TextField( null=True, @@ -465,7 +465,7 @@ class DomainApplication(TimeStampedModel): urbanization = models.TextField( null=True, blank=True, - help_text="Urbanization (Puerto Rico only)", + help_text="Urbanization (required for Puerto Rico only)", ) about_your_organization = models.TextField( @@ -545,7 +545,7 @@ class DomainApplication(TimeStampedModel): anything_else = models.TextField( null=True, blank=True, - help_text="Anything else we should know?", + help_text="Anything else?", ) is_policy_acknowledged = models.BooleanField( diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py index 9f0d654b0..097035f46 100644 --- a/src/registrar/models/domain_information.py +++ b/src/registrar/models/domain_information.py @@ -106,8 +106,8 @@ class DomainInformation(TimeStampedModel): address_line2 = models.TextField( null=True, blank=True, - help_text="Street address line 2", - verbose_name="Street address line 2", + help_text="Street address line 2 (optional)", + verbose_name="Street address line 2 (optional)", ) city = models.TextField( null=True, @@ -131,8 +131,8 @@ class DomainInformation(TimeStampedModel): urbanization = models.TextField( null=True, blank=True, - help_text="Urbanization (Puerto Rico only)", - verbose_name="Urbanization (Puerto Rico only)", + help_text="Urbanization (required for Puerto Rico only)", + verbose_name="Urbanization (required for Puerto Rico only)", ) about_your_organization = models.TextField( @@ -191,7 +191,7 @@ class DomainInformation(TimeStampedModel): anything_else = models.TextField( null=True, blank=True, - help_text="Anything else we should know?", + help_text="Anything else?", ) is_policy_acknowledged = models.BooleanField( diff --git a/src/registrar/models/transition_domain.py b/src/registrar/models/transition_domain.py index 9e6d40cf1..28bdc4fc7 100644 --- a/src/registrar/models/transition_domain.py +++ b/src/registrar/models/transition_domain.py @@ -84,7 +84,7 @@ class TransitionDomain(TimeStampedModel): middle_name = models.TextField( null=True, blank=True, - help_text="Middle name", + help_text="Middle name (optional)", ) last_name = models.TextField( null=True, diff --git a/src/registrar/templates/application_about_your_organization.html b/src/registrar/templates/application_about_your_organization.html index f1b843b7a..0d384b4f5 100644 --- a/src/registrar/templates/application_about_your_organization.html +++ b/src/registrar/templates/application_about_your_organization.html @@ -13,7 +13,7 @@ {% endblock %} {% block form_required_fields_help_text %} -

*This question is required.

+{# commented out so it does not appear on this page #} {% endblock %} {% block form_fields %} diff --git a/src/registrar/templates/application_anything_else.html b/src/registrar/templates/application_anything_else.html index 1c598db9a..f69b7e70e 100644 --- a/src/registrar/templates/application_anything_else.html +++ b/src/registrar/templates/application_anything_else.html @@ -2,7 +2,7 @@ {% load field_helpers %} {% block form_instructions %} -

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

+

Is there anything else you'd like us to know about your domain request? This question is optional.

{% endblock %} {% block form_required_fields_help_text %} diff --git a/src/registrar/templates/application_current_sites.html b/src/registrar/templates/application_current_sites.html index 627727ae3..67343aee9 100644 --- a/src/registrar/templates/application_current_sites.html +++ b/src/registrar/templates/application_current_sites.html @@ -4,7 +4,7 @@ {% block form_instructions %}

Enter your organization’s current public website, if you have one. For example, www.city.com. We can better evaluate your domain request if we know about domains -you’re already using. If you already have any .gov domains please include them.

+you’re already using. If you already have any .gov domains please include them. This question is optional.

{% endblock %} {% block form_required_fields_help_text %} diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/application_dotgov_domain.html index 0d11203ad..bd3c4a473 100644 --- a/src/registrar/templates/application_dotgov_domain.html +++ b/src/registrar/templates/application_dotgov_domain.html @@ -38,8 +38,7 @@
-

What .gov domain do you want? *

+

What .gov domain do you want?

After you enter your domain, we’ll make sure it’s @@ -47,8 +46,6 @@ these initial checks, we’ll verify that it meets all of our requirements once you complete and submit the rest of this form.

-

* This question is required.

- {% with attr_aria_describedby="domain_instructions domain_instructions2" %} {# attr_validate / validate="domain" invokes code in get-gov.js #} {% with append_gov=True attr_validate="domain" add_label_class="usa-sr-only" %} @@ -66,11 +63,11 @@
-

Alternative domains

+

Alternative domains (optional)

Are there other domains you’d like if we can’t give - you your first choice? Entering alternative domains is optional.

+ you your first choice?

{% with attr_aria_describedby="alt_domain_instructions" %} {# attr_validate / validate="domain" invokes code in get-gov.js #} diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/application_form.html index c4c3b2188..db72a1fc2 100644 --- a/src/registrar/templates/application_form.html +++ b/src/registrar/templates/application_form.html @@ -56,9 +56,12 @@ {% block form_instructions %} {% endblock %} -{% block form_required_fields_help_text %} - {% include "includes/required_fields.html" %} -{% endblock %} + +{% if steps.current != "no_other_contacts" %} + {% block form_required_fields_help_text %} + {% include "includes/required_fields.html" %} + {% endblock %} +{% endif %}
{% csrf_token %} diff --git a/src/registrar/templates/application_org_election.html b/src/registrar/templates/application_org_election.html index 45776af5c..04c8f2657 100644 --- a/src/registrar/templates/application_org_election.html +++ b/src/registrar/templates/application_org_election.html @@ -2,9 +2,7 @@ {% load field_helpers %} {% block form_instructions %} -

- Is your organization an election office? * -

+

Is your organization an election office?

An election office is a government entity whose primary responsibility is overseeing elections and/or conducting voter registration.

@@ -13,7 +11,7 @@ {% endblock %} {% block form_required_fields_help_text %} -

* This question is required.

+{# commented out so it does not appear on this page #} {% endblock %} {% block form_fields %} diff --git a/src/registrar/templates/application_org_federal.html b/src/registrar/templates/application_org_federal.html index 28cabadd0..8a5a574b0 100644 --- a/src/registrar/templates/application_org_federal.html +++ b/src/registrar/templates/application_org_federal.html @@ -3,15 +3,14 @@ {% block form_instructions %}

- Which federal branch is your organization in? * + Which federal branch is your organization in?

{% endblock %} {% block form_required_fields_help_text %} -

* This question is required.

+{# commented out so it does not appear on this page #} {% endblock %} - {% block form_fields %} {% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" %} {% input_with_errors forms.0.federal_type %} diff --git a/src/registrar/templates/application_org_type.html b/src/registrar/templates/application_org_type.html index 80d599920..ef3fb82f7 100644 --- a/src/registrar/templates/application_org_type.html +++ b/src/registrar/templates/application_org_type.html @@ -3,16 +3,15 @@ {% block form_instructions %}

- What kind of U.S.-based government organization do you represent? * + What kind of U.S.-based government organization do you represent?

{% endblock %} {% block form_required_fields_help_text %} -

* This question is required.

+{# commented out so it does not appear on this page #} {% endblock %} - {% block form_fields %} {% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" %} {% input_with_errors forms.0.organization_type %} diff --git a/src/registrar/templates/application_other_contacts.html b/src/registrar/templates/application_other_contacts.html index 679742281..a3f0971dc 100644 --- a/src/registrar/templates/application_other_contacts.html +++ b/src/registrar/templates/application_other_contacts.html @@ -13,18 +13,16 @@ {% endblock %} {% block form_required_fields_help_text %} -{# there are no required fields on this page so don't show this #} +{% include "includes/required_fields.html" %} {% endblock %} - - {% block form_fields %} {{ forms.0.management_form }} {# forms.0 is a formset and this iterates over its forms #} {% for form in forms.0.forms %}
-

Organization contact {{ forloop.counter }}

+

Organization contact {{ forloop.counter }} (optional)

{% input_with_errors form.first_name %} diff --git a/src/registrar/templates/application_purpose.html b/src/registrar/templates/application_purpose.html index 5135e6678..8747a34c7 100644 --- a/src/registrar/templates/application_purpose.html +++ b/src/registrar/templates/application_purpose.html @@ -13,11 +13,9 @@ Read about * This question is required.

+{# commented out so it does not appear on this page #} {% endblock %} - - {% block form_fields %} {% with attr_maxlength=1000 add_label_class="usa-sr-only" %} {% input_with_errors forms.0.purpose %} diff --git a/src/registrar/templates/application_requirements.html b/src/registrar/templates/application_requirements.html index ef0a4c7ef..c1600d523 100644 --- a/src/registrar/templates/application_requirements.html +++ b/src/registrar/templates/application_requirements.html @@ -50,6 +50,10 @@

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

{% endblock %} +{% block form_required_fields_help_text %} +{# commented out so it does not appear on this page #} +{% endblock %} + {% block form_fields %}
diff --git a/src/registrar/templates/application_status.html b/src/registrar/templates/application_status.html index 79d0f7ff9..3bf02f0e0 100644 --- a/src/registrar/templates/application_status.html +++ b/src/registrar/templates/application_status.html @@ -111,7 +111,7 @@ {% include "includes/summary_item.html" with title='Other employees from your organization' value=domainapplication.other_contacts.all contact='true' list='true' heading_level=heading_level %} - {% include "includes/summary_item.html" with title='Anything else we should know' value=domainapplication.anything_else|default:"No" heading_level=heading_level %} + {% include "includes/summary_item.html" with title='Anything else?' value=domainapplication.anything_else|default:"No" heading_level=heading_level %} {% endwith %} diff --git a/src/registrar/templates/django/forms/label.html b/src/registrar/templates/django/forms/label.html index da90a372a..18d24a7bd 100644 --- a/src/registrar/templates/django/forms/label.html +++ b/src/registrar/templates/django/forms/label.html @@ -7,7 +7,13 @@ {% else %} {{ field.label }} {% endif %} + {% if widget.attrs.required %} - * + + {% if field.label == "Is your organization an election office?" or field.label == "What .gov domain do you want?" or field.label == "I read and agree to the requirements for operating .gov domains." or field.label == "Please explain why there are no other employees from your organization we can contact to help us assess your eligibility for a .gov domain." %} + {% else %} + * + {% endif %} {% endif %} + diff --git a/src/registrar/templates/emails/includes/application_summary.txt b/src/registrar/templates/emails/includes/application_summary.txt index 293dad2e4..c628e1074 100644 --- a/src/registrar/templates/emails/includes/application_summary.txt +++ b/src/registrar/templates/emails/includes/application_summary.txt @@ -34,6 +34,6 @@ Other employees from your organization: {% for other in application.other_contacts.all %} {% spaceless %}{% include "emails/includes/contact.txt" with contact=other %}{% endspaceless %} {% endfor %}{% endif %}{% if application.anything_else %} -Anything else we should know? +Anything else? {{ application.anything_else }} {% endif %} \ No newline at end of file diff --git a/src/registrar/templates/includes/required_fields.html b/src/registrar/templates/includes/required_fields.html index 58612a284..0087b048a 100644 --- a/src/registrar/templates/includes/required_fields.html +++ b/src/registrar/templates/includes/required_fields.html @@ -1,3 +1,3 @@

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

diff --git a/src/registrar/tests/test_emails.py b/src/registrar/tests/test_emails.py index 7bce52668..eb6da072d 100644 --- a/src/registrar/tests/test_emails.py +++ b/src/registrar/tests/test_emails.py @@ -158,7 +158,7 @@ class TestEmails(TestCase): _, kwargs = self.mock_client.send_email.call_args body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"] # spacing should be right between adjacent elements - self.assertRegex(body, r"5557\n\nAnything else we should know?") + self.assertRegex(body, r"5557\n\nAnything else?") @boto3_mocking.patching def test_submission_confirmation_no_anything_else_spacing(self): @@ -168,6 +168,6 @@ class TestEmails(TestCase): application.submit() _, kwargs = self.mock_client.send_email.call_args body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"] - self.assertNotIn("Anything else we should know", body) + self.assertNotIn("Anything else", body) # spacing should be right between adjacent elements self.assertRegex(body, r"5557\n\n----") diff --git a/src/registrar/views/application.py b/src/registrar/views/application.py index f11c26b69..32633a89b 100644 --- a/src/registrar/views/application.py +++ b/src/registrar/views/application.py @@ -86,7 +86,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView): Step.YOUR_CONTACT: _("Your contact information"), Step.OTHER_CONTACTS: _("Other employees from your organization"), Step.NO_OTHER_CONTACTS: _("No other employees from your organization?"), - Step.ANYTHING_ELSE: _("Anything else we should know?"), + Step.ANYTHING_ELSE: _("Anything else?"), Step.REQUIREMENTS: _("Requirements for operating .gov domains"), Step.REVIEW: _("Review and submit your domain request"), } diff --git a/src/registrar/views/domain.py b/src/registrar/views/domain.py index 8bcebc20a..81f1d0bb7 100644 --- a/src/registrar/views/domain.py +++ b/src/registrar/views/domain.py @@ -280,6 +280,7 @@ class DomainNameserversView(DomainFormBaseView): form.fields["server"].required = True else: form.fields["server"].required = False + form.fields["server"].label += " (optional)" form.fields["domain"].initial = self.object.name return formset