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" %}
{# 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 %}
{% endwith %}
{% endwith %}
@ -75,7 +75,7 @@
{% with attr_aria_describedby="alt_domain_instructions" %}
{# attr_validate / validate="domain" invokes code 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 %}
{% input_with_errors form.alternative_domain %}
{% endfor %}

View file

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