{% macro render_field(field) %}
  <div class="form-group xs-pt-10">
    <div class="form-group">
        {% if field.type == 'BooleanField' %}
            <div class="col-sm-offset-3 col-sm-6">
              <div class="be-checkbox">
                <input id="{{ field.id }}" name="{{ field.id }}" type="checkbox" {% if field.object_data %}checked{% endif %}>
                {{ field.label }}
              </div>
            </div>
        {% else %}
            <label class="col-sm-3 control-label">{{ field.label }}</label>
            <div class="col-sm-6">
              {{ field(class_='form-control', **kwargs)|safe }}
            </div>
        {% endif %}
        {% if field.errors %}
          <div class="col-sm-offset-3 col-sm-6">
            <ul class=errors>
            {% for error in field.errors %}<li>{{ error }}</li>{% endfor %}
            </ul>
          </div>
        {% endif %}
    </div>
  </div>
{% endmacro %}
