{% set container_style = schema.get('style') %}
{% set show_title = ((show_object_title is none and config['SHOW_OBJECT_TITLE']) or show_object_title) and schema.title %}
{% if show_title or container_style in ("collapsible", "expandable") %}
  <div style="font-size:1.5em; padding-left: {% if not indent_level %}15{% else %}9{% endif %}px; margin-bottom: 5px; margin-top: 10px;">
    {% if container_style in ("collapsible", "expandable") %}
      <i class="fa fa-w {% if container_style == "collapsible" %}fa-minus-square-o{% else %}fa-plus-square-o{% endif %} collapse-expand-button" data-id-prefix="{{ id_prefix }}" style="font-size:0.8em;" data-toggle="tooltip" data-placement="top" title="{% if container_style == "collapsible" %}{{ _("Collapse") }}{% else %}{{ _("Expand") }}{% endif %}" data-collapse-text="{{ _("Collapse") }}" data-expand-text="{{ _("Expand") }}"></i>
    {% endif %}
    {% if show_title %}
      <span>{{ schema.title | get_translated_text }}</span>
    {% endif %}
  </div>
{% endif %}
{% set indent_level = indent_level + 1 %}
<div style="border-left: 1px solid {% if show_indent_border %}#dddddd{% else %}transparent{% endif %}; margin-left: 9px; padding-left: 5px;{% if container_style == "expandable" %}display:none;{% endif %}" class="collapsible-object-container" data-id-prefix="{{ id_prefix }}">
  <div style="{% if container_style == 'horizontal' %}display: flex; flex-wrap: wrap; padding-left: 15px;{% endif %}">
    {% set show_indent_border = True %}
    <input type="hidden" name="{{ id_prefix }}_hidden" value="object" />
    {% set property_names = get_property_names_in_order(schema) %}
    {% for property_name in property_names %}
      {% set hidden = 'show_more' in schema.keys() and property_name in schema['show_more'] %}
      {% set is_required = property_name in schema.get('required', ()) %}
      {% set schema = schema.properties[property_name] %}
      {% set parent_id_prefix = id_prefix %}
      {% set property_path = property_path + (property_name,) %}
      {% set id_prefix = id_prefix_for_property_path(property_path, id_prefix_root) %}
      {% if data is not none and property_name in data %}
        {% set data = data[property_name] %}
      {% else %}
        {% set data = none %}
      {% endif %}
      {% if 'conditions' in schema %}
        <div data-condition-wrapper-for="{{ id_prefix }}" class="condition-wrapper">
          <div {% if hidden %}class="hidden show-more-{{ parent_id_prefix }}"{% endif %}>
            {% include "objects/inline_edit/inline_edit_any.html" %}
          </div>
          <input type="hidden" class="condition-wrapper" data-id-prefix="{{ id_prefix}}" data-conditions='{{ schema["conditions"] | encode_choices | stringify }}'>
        </div>
      {% else %}
        <div {% if hidden %}class="hidden show-more-{{ parent_id_prefix }}"{% endif %}>
          {% include "objects/inline_edit/inline_edit_any.html" %}
        </div>
      {% endif %}
    {% endfor %}
    {% if schema.get("show_more") %}
      <div class="row">
        <div class="col-md-3" style="padding-rigth: 0px;"></div>
        <div class="col-md-9" style="padding-left: 5px;">
          <button id="show-more-{{ id_prefix }}-btn" class="btn btn-default btn-xs show-more-button" data-id-prefix="{{ id_prefix }}">{{ _('Show more') }}</button>
        </div>
      </div>
    {% endif %}
  </div>
</div>
