/srv/users/serverpilot/apps/camh/craft/templates/components/_select.twig(32)
20 21 {% if settings.active is null %} 22 {% set settings = settings|merge({ 'active': settings.options|keys|first }) %} 23 {% endif %} 24 25 <label class="form__select-label form__select-label--{{ settings.labelPlacement }}" for="{{ settings.id }}">{{ settings.label }}:</label> 26 27 <div class="form__select-container"> 28 <div class="form__select{% if settings.showAll %} form__select--show-all{% endif %}" tabindex="0"> 29 30 {# the "line" is so we can hide any overflow from the first line in the selected option#} 31 <span class="form__select-value"> 32 <span class="form__select-value-line">{{ settings.options[settings.active] }}</span> 33 </span> 34 35 <ul class="form__select-options"> 36 {% for value, text in settings.options %} 37 <li data-value="{{ value }}" class="form__select-option{% if settings.active == value %} form__select-option--active{% endif %}" tabindex="0">{{ text }}</li> 38 {% endfor %} 39 </ul> 40 41 <select class="form__select-input" id="{{ settings.id }}" tabindex="-1"> 42 {% for value, text in settings.options %} 43 <option value="{{ value }}"{% if settings.active == value %} selected{% endif %}>{{ text }}</option> 44 {% endfor %}