* Update application_wizard.py

* Newer, slimmer version of legal content

* Update form section labels

* Updated text for request for info from tribal govs

* Added text to clarify that managing elections should be primary purpose of office

* Added question about audience to align with new requirements

* Fix link in error message, tests and linting

---------

Co-authored-by: Neil Martinsen-Burrell <neil.martinsen-burrell@gsa.gov>
This commit is contained in:
Michelle Rago 2023-02-28 12:37:01 -05:00 committed by GitHub
parent 6bbe3b4a95
commit a8115a5778
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 51 additions and 187 deletions

View file

@ -6,6 +6,8 @@ from phonenumber_field.formfields import PhoneNumberField # type: ignore
from django import forms
from django.core.validators import RegexValidator
from django.urls import reverse
from django.utils.safestring import mark_safe
from api.views import DOMAIN_API_MESSAGES
@ -179,11 +181,19 @@ class TribalGovernmentForm(RegistrarForm):
self.cleaned_data["federally_recognized_tribe"]
or self.cleaned_data["state_recognized_tribe"]
):
todo_url = reverse("todo")
raise forms.ValidationError(
"Only tribes recognized by the U.S. federal government or by a U.S."
" state government are eligible for .gov domains. Please email"
" registrar@dotgov.gov to tell us more about your tribe and why you"
" want a .gov domain.",
# no sec because we are using it to include an internal URL
# into a link. There should be no user-facing input in the
# HTML indicated here.
mark_safe( # nosec
"Only tribes recognized by the U.S. federal government "
"or by a U.S. state government are eligible for .gov "
'domains. Please <a href="{}">tell us more '
"about your tribe and why you want a .gov domain</a>.".format(
todo_url
)
),
code="invalid",
)
@ -682,14 +692,11 @@ class AnythingElseForm(RegistrarForm):
class RequirementsForm(RegistrarForm):
is_policy_acknowledged = forms.BooleanField(
label=(
"I read and agree to the requirements for registering "
"and operating .gov domains."
),
label=("I read and agree to the requirements for operating .gov domains."),
error_messages={
"required": (
"Check the box if you read and agree to the requirements for"
" registering and operating .gov domains."
" operating .gov domains."
)
},
)