{#
/**
 * List DropDown select Html
 *
 * @var $sOptions         : the select options, generated with the view item_options.php
 * @var $sOther           : the other input field, generated with the view item_noanswer.php
 *
 * @var $name
 * @var $dropdownSize
 * @var $checkconditionFunction
 * @var $select_show_hide
 *
 */
#}


{% set data_live_search = (question_template_attribute.show_search == 'default' or question_template_attribute.show_search is empty or question_template_attribute.show_search == 'false') ? '' : "data-live-search='true'" %}
{% set show_tick = (question_template_attribute.show_tick == 'default' or question_template_attribute.show_tick is empty or question_template_attribute.show_tick == 'false') ? '' : "show-tick" %}
{% set width_entry = (question_template_attribute.width_entry == 'default' or question_template_attribute.width_entry is empty or question_template_attribute.width_entry == 'false') ? "data-width='auto'" : '' %}

<!-- List Dropdown -->

<!-- answer-->
<div class="form-inline">
    <div class="{{ coreClass }} form-group">
        <select
                class="form-control list-question-select {{ show_tick }}"
                {{ data_live_search }}
                {{ width_entry }}
                data-none-selected-text=''
                name="{{ name }}"
                id="answer{{ name }}"
                {% if dropdownSize %} size={{ dropdownSize }} {% endif %}
                aria-labelledby="ls-question-text-{{ basename }}"
        >
                {# rows/option.php #}
                {{ sOptions }}
        </select>
            {# rows/othertext.php #}
            {{ sOther }}

        {# Value for expression manager javascript (use id) ; no need to submit #}
        {{ C.Html.hiddenField("java"~name,value,({
            'id' : "java"~name,
            'disabled' : "disabled",
        }))
        }}
    </div>
    <script type="text/javascript">
        $(function () {
            $('#answer{{ name }}').selectpicker();
        });
    </script>
</div>
<!-- end of answer  -->
