{% extends DYNAMICFORMS.field_base_template %}
{% block field_input %}
  {% if field.password_field %}
    <div class="input-group">{% endif %}
<input id="{{ field.uuid }}" name="{{ field.name }}"
       class="{% if style.input_type != "file" %}form-control{% else %} form-control-file{% endif %}{% if field.errors %} is-invalid{% endif %}"
       type="{{ style.input_type }}" {% if style.input_type in "datetime-local,time" %}step="
        {% if field.time_step %}{{ field.time_step }}{% else %}1{% endif %}"{% endif %}
       {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %}
       {% if field.value is not None %}value="{{ field.value }}"{% endif %}
       {% if style.autofocus and style.input_type != "hidden" %}autofocus{% endif %}
       {% if field.read_only %}readonly{% endif %}/>
{% if field.password_field %}
  {% if DYNAMICFORMS.bootstrap_version == 'v4' %}
    <div class="input-group-append">
        <span id="pwf-{{ field.uuid }}" class="input-group-text password-field"
              onclick="dynamicforms.togglePasswordField('{{ field.uuid }}')"></span>
    </div>
  {% elif DYNAMICFORMS.bootstrap_version == 'v3' %}
    <span class="input-group-addon" style="background-color: transparent;"
          onclick="dynamicforms.togglePasswordField('{{ field.uuid }}')">
      <span id="pwf-{{ field.uuid }}" class="glyphicon glyphicon-eye-open"></span></span>

  {% endif %}
  </div>
{% endif %}
{% endblock %}
