mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-30 14:36:32 +02:00
Merge branch 'main' into rjm/3190-heading-refactor
This commit is contained in:
commit
e238cc29fd
4 changed files with 11 additions and 6 deletions
|
@ -462,6 +462,7 @@ class CurrentSitesForm(RegistrarForm):
|
|||
error_messages={
|
||||
"invalid": ("Enter your organization's current website in the required format, like example.com.")
|
||||
},
|
||||
widget=forms.URLInput(attrs={"aria-labelledby": "id_current_sites_header id_current_sites_body"}),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -15,9 +15,11 @@ class DomainHelper:
|
|||
|
||||
# a domain name is alphanumeric or hyphen, up to 63 characters, doesn't
|
||||
# begin or end with a hyphen, followed by a TLD of 2-6 alphabetic characters
|
||||
DOMAIN_REGEX = re.compile(r"^(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.[A-Za-z]{2,6}$")
|
||||
DOMAIN_REGEX = re.compile(r"^(?!-)[A-Za-z0-9-]{1,200}(?<!-)\.[A-Za-z]{2,6}$")
|
||||
|
||||
# a domain can be no longer than 253 characters in total
|
||||
# NOTE: the domain name is limited by the DOMAIN_REGEX above
|
||||
# to 200 characters (not including the .gov at the end)
|
||||
MAX_LENGTH = 253
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
{% block form_instructions %}
|
||||
<p>We can better evaluate your request if we know about domains you’re already using.</p>
|
||||
<h2>What are the current websites for your organization?</h2>
|
||||
<p>Enter your organization’s current public websites. If you already have a .gov domain, include that in your list. This question is optional.</p>
|
||||
<h2 id="id_current_sites_header">What are the current websites for your organization?</h2>
|
||||
<p id="id_current_sites_body">Enter your organization’s current public websites. If you already have a .gov domain, include that in your list. This question is optional.</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block form_required_fields_help_text %}
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<p id="domain_instructions" class="margin-top-05">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 our requirements after you complete the rest of this form.</p>
|
||||
|
||||
{% with attr_aria_describedby="domain_instructions domain_instructions2" %}
|
||||
{% with attr_aria_labelledby="domain_instructions domain_instructions2" attr_aria_describedby="id_dotgov_domain-requested_domain--toast" %}
|
||||
{# attr_validate / validate="domain" invokes code in getgov.min.js #}
|
||||
{% with append_gov=True attr_validate="domain" add_label_class="usa-sr-only" %}
|
||||
{% input_with_errors forms.0.requested_domain %}
|
||||
|
@ -67,12 +67,14 @@
|
|||
<p id="alt_domain_instructions" class="margin-top-05">Are there other domains you’d like if we can’t give
|
||||
you your first choice?</p>
|
||||
|
||||
{% with attr_aria_describedby="alt_domain_instructions" %}
|
||||
{% with attr_aria_labelledby="alt_domain_instructions" %}
|
||||
{# Will probably want to remove blank-ok and do related cleanup when we implement delete #}
|
||||
{% with attr_validate="domain" append_gov=True add_label_class="usa-sr-only" add_class="blank-ok alternate-domain-input" %}
|
||||
{% for form in forms.1 %}
|
||||
<div class="repeatable-form">
|
||||
{% input_with_errors form.alternative_domain %}
|
||||
{% with attr_aria_describedby=form.alternative_domain.auto_id|stringformat:"s"|add:"--toast" %}
|
||||
{% input_with_errors form.alternative_domain %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue