mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
avoiding for loop in django template tag
This commit is contained in:
parent
81b7bac482
commit
2e1ddd91e5
1 changed files with 15 additions and 18 deletions
|
@ -21,25 +21,22 @@
|
|||
{% 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 %}
|
||||
{% if widget.attrs.required and field.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"
|
||||
] %}
|
||||
<abbr class="usa-hint usa-hint--required" title="required">*</abbr>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
</{{ label_tag }}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue