{% load dynamicforms %}
{% block class_container %}
  {% set_var sub_templatename='' %}
  {% if DYNAMICFORMS.bootstrap_version == 'v4' %}
      {% set_var sub_templatename=DYNAMICFORMS.template|add:'field/base_field_v4.html' %}
  {% elif DYNAMICFORMS.bootstrap_version == 'v3' %}
      {% set_var sub_templatename=DYNAMICFORMS.template|add:'field/base_field_v3.html' %}
  {% endif %}

  {% if input_type == 'checkbox' %}form-check{% else %}form-group{% endif %}
  {% if errors %}has-error{% endif %}
  {% if hide_container %}
  {% extendtemplate template_name_var=sub_templatename block="class_invisible" only %}
  {% endif %}
{% endblock %}

{% block class_label %}
  {% if hide_label %}sr-only{% endif %}
{% endblock %}

{% block class_span_error %}
  {% set_var sub_templatename='' %}
  {% if DYNAMICFORMS.bootstrap_version == 'v4' %}
      {% set_var sub_templatename=DYNAMICFORMS.template|add:'field/base_field_v4.html' %}
  {% elif DYNAMICFORMS.bootstrap_version == 'v3' %}
      {% set_var sub_templatename=DYNAMICFORMS.template|add:'field/base_field_v3.html' %}
  {% endif %}

  {% extendtemplate template_name_var=sub_templatename block="class_span_error" only %}
{% endblock %}

{% block class_span_help %}
  {% set_var sub_templatename='' %}
  {% if DYNAMICFORMS.bootstrap_version == 'v4' %}
      {% set_var sub_templatename=DYNAMICFORMS.template|add:'field/base_field_v4.html' %}
  {% elif DYNAMICFORMS.bootstrap_version == 'v3' %}
      {% set_var sub_templatename=DYNAMICFORMS.template|add:'field/base_field_v3.html' %}
  {% endif %}

  {% extendtemplate template_name_var=sub_templatename block="class_span_help" only %}
{% endblock %}
