{% extends "@bazar/layouts/input.twig" %}

{% block input %}
    <div class="input-group">
        <input
            type="{{ field.subType }}"
            value="{{ value }}"
            id="{{ field.name }}"
            name="{{ field.name }}"
            class="form-control input-xxlarge"
            {% if field.subType == 'number' -%}
              {%- if field.maxChars != '' %}max="{{ field.maxChars }}"{% endif -%}
              {%- if field.size != '' %}min="{{ field.size }}"{% endif -%}
            {%- else -%}
              {%- if field.maxChars != '' %}maxlength="{{ field.maxChars }}"{% endif -%}
              {%- if field.size != '' %}size="{{ field.size }}"{% endif -%}
            {% endif %}
            {% if field.pattern %}pattern="{{ field.pattern }}"{% endif %}
            placeholder="{{ field.label|raw('html')|striptags }}"
            {% if field.required %}required{% endif %}
        />
    </div>
{% endblock %}
