<%# locals: { f, field_label, field_name, select_values, selected_value, field_class, required, readonly, multiple, validation, ttip } %>
<% field_label = field_label || 'No label defined' %>
<% field_label = required ? "* #{field_label}" : field_label%>

<% selected_value ||= default_value %>
<% include_blank = !selected_value && !default_value %>
<div class="col-md-12">
    <%= f.label field_id, field_label, class: 'control-label' %>
</div>
<div class="col-md-12 dynamic-field">
    <%= select_tag field_name,
                options_for_select(select_values,
                selected: selected_value),
                disabled: readonly,
                multiple: multiple,
                include_blank: include_blank,
                "data-toggle": "tooltip",
                title: ttip,
                class: "form-control #{field_class}",
                id: field_id  %>
    <%= render partial: "shared/dynamic_form/validation_indicator", locals: {
                    validation: validation
        } unless validation == "none"
    %>
</div>