Split www_gov into two vars

This commit is contained in:
zandercymatics 2023-08-28 12:51:19 -06:00
parent a0ed174e7a
commit a7a07c8190
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 10 additions and 8 deletions

View file

@ -51,7 +51,7 @@
{% with attr_aria_describedby="domain_instructions domain_instructions2" %} {% with attr_aria_describedby="domain_instructions domain_instructions2" %}
{# attr_validate / validate="domain" invokes code in get-gov.js #} {# attr_validate / validate="domain" invokes code in get-gov.js #}
{% with www_gov=True attr_validate="domain" add_label_class="usa-sr-only" %} {% with append_gov=True attr_validate="domain" add_label_class="usa-sr-only" %}
{% input_with_errors forms.0.requested_domain %} {% input_with_errors forms.0.requested_domain %}
{% endwith %} {% endwith %}
{% endwith %} {% endwith %}
@ -75,7 +75,7 @@
{% with attr_aria_describedby="alt_domain_instructions" %} {% with attr_aria_describedby="alt_domain_instructions" %}
{# attr_validate / validate="domain" invokes code in get-gov.js #} {# attr_validate / validate="domain" invokes code in get-gov.js #}
{# attr_auto_validate likewise triggers behavior in get-gov.js #} {# attr_auto_validate likewise triggers behavior in get-gov.js #}
{% with www_gov=True attr_validate="domain" attr_auto_validate=True %} {% with append_gov=True attr_validate="domain" attr_auto_validate=True %}
{% for form in forms.1 %} {% for form in forms.1 %}
{% input_with_errors form.alternative_domain %} {% input_with_errors form.alternative_domain %}
{% endfor %} {% endfor %}

View file

@ -55,18 +55,20 @@ error messages, if necessary.
</div> </div>
{% endif %} {% endif %}
{% if www_gov %} {% if prepend_www or append_gov %}
<div class="display-flex flex-align-center"> <div class="display-flex flex-align-center">
{# Commented out for ticket #720: https://github.com/cisagov/getgov/issues/720 #} {# ticket #720: https://github.com/cisagov/getgov/issues/720 #}
<!-- {% if prepend_www %}
<span class="padding-top-05 padding-right-2px">www.</span> <span class="padding-top-05 padding-right-2px">www.</span>
--> {% endif %}
{% endif %} {% endif %}
{# this is the input field, itself #} {# this is the input field, itself #}
{% include widget.template_name %} {% include widget.template_name %}
{% if www_gov %} {% if prepend_www or append_gov %}
{% if append_gov %}
<span class="padding-top-05 padding-left-2px">.gov </span> <span class="padding-top-05 padding-left-2px">.gov </span>
{% endif %}
</div> </div>
{% endif %} {% endif %}