trying a different approach

This commit is contained in:
Kristina Yin 2023-11-27 16:14:26 -08:00
parent 4c7cdf323f
commit 81b7bac482
No known key found for this signature in database
GPG key ID: 9BB3845BB3A21584
3 changed files with 29 additions and 47 deletions

View file

@ -170,7 +170,7 @@ class TribalGovernmentForm(RegistrarForm):
)
tribe_name = forms.CharField(
label="What is the name of the tribe you represent? ",
label="What is the name of the tribe you represent?",
error_messages={"required": "Enter the tribe you represent."},
)

View file

@ -2,9 +2,7 @@
{% load field_helpers %}
{% block form_instructions %}
<h2 class="margin-bottom-05">
Is your organization an election office?
</h2>
<h2 class="margin-bottom-05">Is your organization an election office?</h2>
<p>An election office is a government entity whose <em>primary</em> responsibility is overseeing elections and/or conducting voter registration.</p>

View file

@ -8,54 +8,38 @@
{{ field.label }}
{% endif %}
{% if widget.attrs.required %}
<!-- Don't include asterisk in one-field forms -->
{% if field.label != "Is your organization an election office" %}
{% if field.label != "What .gov domain do you want" %}
{% if field.label != "I read and agree to the requirements for operating .gov domains" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
<!--
{% if widget.attrs.required %}
{% if field.label == "What is the name of the tribe you represent? “ %}
{% if field.label != "Is your organization an election office?" %}
{% if field.label != "What .gov domain do you want?" %}
{% if field.label != "I read and agree to the requirements for operating .gov domains." %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "Organization name" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "Street address" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "City" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "State, territory, or military post" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "Zip code" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "First name / given name" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "Last name / family name" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "Title or role in your organization" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "Email" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% if field.label == "Phone" %}
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
{% endif %}
{% endif %}
-->
{% if widget.attrs.required %}
{% for required_label in [
"What is the name of the tribe you represent?",
"Organization name",
"Street address",
"City",
"State, territory, or military post",
"Zip code",
"First name / given name",
"Last name / family name",
"Title or role in your organization",
"Email",
"Phone"
] %}
{% if field.label == required_label %}
<abbr class="usa-hint usa-hint--required" title="required"> *</abbr>
{% endif %}
{% endfor %}
{% endif %}
</{{ label_tag }}>