cl-deck-builder2/templates/decks/_field_control_select.html

22 lines
896 B
HTML
Raw Permalink Normal View History

2024-01-21 02:35:35 -05:00
<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>