{% extends default ? "partials/field.html.twig" : 'forms/' ~ layout|default('field') ~ '.html.twig' %}

{% block input %}
    <div class="g-icons">
        <div class="input-group append">
            <input
                    {# required attribute structures #}
                    type="text"
                    name="{{ (scope ~ name)|fieldName|e }}"
                    value="{{ value|join(', ')|e }}"
                    {# global attribute structures #}
                    {{ block('global_attributes') }}
                    {# non-gloval attribute structures #}
                    {% if field.autocomplete in ['on', 'off'] %}autocomplete="{{ field.autocomplete|e }}"{% endif %}
                    {% if field.autofocus in ['on', 'true', 1] %}autofocus="autofocus"{% endif %}
                    {% if field.disabled in ['on', 'true', 1] %}disabled="disabled"{% endif %}
                    {% if field.list is defined %}list="{{ field.list|e }}"{% endif %}
                    />
            {% set picker = 'input[name="' ~ ((scope ~ name)|fieldName|e) ~ '"]' %}
             <span class="input-group-btn">
                <button class="button" type="button" data-g5-iconpicker="{{ picker|e('html_attr') }}">
                    <i class="{{ value|default('fa fa-hand-o-up picker')|e('html_attr') }}"></i>
                </button>
            </span>
            {% block reset_field %}{{ parent() }}{% endblock %}
        </div>
    </div>
{% endblock %}
