cl-deck-builder2/templates/decks/_field_control_select.html
2024-03-05 22:11:33 -05:00

22 lines
896 B
HTML

<div class="field">
<label class="label" for="{{ name }}">{{ label }}</label>
<div class="control">
<div class="select">
<select name="{{ name }}"
{% if form %}form="{{ form }}"{% endif %}
{% if hx-include %}hx-include="{{ hx-include }}"{% endif %}
{% if hx-post %}hx-post="{{ hx-post }}"{% endif %}
{% if hx-target %}hx-target="{{ hx-target }}"{% endif %}
{% if hx-trigger %}hx-trigger="{{ hx-trigger }}"{% endif %}
{% if onchange %}onchange="{{ onchange }}"{% endif %}>
{% if none %}<option value="">{_ "None" _}</option>{% endif %}
{% for option in options %}
<option value="{{ option.id }}"
{% if id == option.id %}selected="selected"{% endif %}
>{{ option.name }}</option>
{% endfor %}
</select>
</div>
</div>
</div>