use public_sire_url helper in application_wizard error alert

This commit is contained in:
Rachid Mrad 2023-09-19 14:17:17 -04:00
parent 4db5b94b36
commit 03e7e9d67d
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF

View file

@ -12,6 +12,7 @@ from django.utils.safestring import mark_safe
from api.views import DOMAIN_API_MESSAGES
from registrar.models import Contact, DomainApplication, DraftDomain, Domain
from registrar.templatetags.url_helpers import public_site_url
from registrar.utility import errors
logger = logging.getLogger(__name__)
@ -181,7 +182,6 @@ class TribalGovernmentForm(RegistrarForm):
self.cleaned_data["federally_recognized_tribe"]
or self.cleaned_data["state_recognized_tribe"]
):
todo_url = reverse("todo")
raise forms.ValidationError(
# no sec because we are using it to include an internal URL
# into a link. There should be no user-facing input in the
@ -190,10 +190,10 @@ class TribalGovernmentForm(RegistrarForm):
"You cant complete this application yet. "
"Only tribes recognized by the U.S. federal government "
"or by a U.S. state government are eligible for .gov "
'domains. Please use our <a href="{}">contact form</a> to '
'domains. Use our <a href="{}">contact form</a> to '
"tell us more about your tribe and why you want a .gov "
"domain. Well review your information and get back "
"to you.".format(todo_url)
"to you.".format(public_site_url('contact'))
),
code="invalid",
)