mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-30 22:46:30 +02:00
updated behavior of combobox, added state territory combobox
This commit is contained in:
parent
560baed2e1
commit
bb5f61fd98
2 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,7 @@ class RequestingEntityForm(RegistrarForm):
|
|||
label="State, territory, or military post",
|
||||
required=False,
|
||||
choices=[("", "--Select--")] + DomainRequest.StateTerritoryChoices.choices,
|
||||
widget=ComboboxWidget,
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
{# hint: spacing in the class string matters #}
|
||||
class="usa-select{% if classes %} {{ classes }}{% endif %}"
|
||||
{% include "django/forms/widgets/attrs.html" %}
|
||||
data-default-value="{% for group_name, group_choices, group_index in widget.optgroups %}{% for option in group_choices %}{% if option.selected %}{{ option.value }}{% endif %}{% endfor %}{% endfor %}"
|
||||
>
|
||||
{% for group, options, index in widget.optgroups %}
|
||||
{% if group %}<optgroup label="{{ group }}">{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue