<!-- array start -->
<div class="form-group row">
  <div class="col-md-3 control-label">
    {% if schema.title %}<strong><span {% if schema.minItems %}class="required-label"{% endif %}>{{ schema.title | get_translated_text }}</span></strong>{% endif %}
  </div>
{% set is_required = False %}
{% set minItems = schema.get('minItems', 0) %}
{% set maxItems = schema.get('maxItems', None) %}
{% if data is not none %}
{% set numItems = (data | length) %}
{% else %}
{% set numItems = 0 %}
{% endif %}
{% set itemName = (schema['items'].title | get_translated_text) %}
{% if data is not none %}
{% for item in data %}
  {% set name = "item" %}
  {% set tmp_style = schema['style'] %}
  {% set schema = schema['items'] %}
  {% set z = schema.update({'parent_style': tmp_style}) %}
  {% set id_prefix = id_prefix + '_{}_'.format(loop.index0) %}
  {% set data = item %}
    <div class="col-md-9 {% if loop.index0 %}col-md-offset-3{% endif %}" style="display:flex; padding-left:2em; padding-right:1.75em">
      {% include "objects/forms/form_any.html" %}
      <div style="flex-grow: 0; flex-basis: 4em; text-align: right;">
      {% if numItems > minItems %}
        <button type="submit" name="action_{{ id_prefix }}_delete" class="btn btn-danger" style="height:34px;"><i class="fa fa-minus"></i></button>
      {% else %}
        <button type="button" class="btn btn-danger disabled" style="height:34px;"><i class="fa fa-minus"></i></button>
      {% endif %}
      </div>
  </div>
{% endfor %}
{% endif %}
<div class="col-md-9 {% if data %}col-md-offset-3{% endif %}" style="display: flex; padding-left:1em; padding-right:1.75em">
  <div style="flex-grow: 1">
  {% if 'note' in schema['items'] %}
    <span class="help-block"><strong>{{ _('Note:') }}</strong> {{ schema['items']['note'] | get_translated_text }}</span>
  {% endif %}
  </div>
<div style="flex-grow: 0; flex-basis: 4em;"></div>
{% if maxItems is none or numItems < maxItems %}
  <button type="submit" name="action_{{ id_prefix }}_?__add" class="btn btn-success" style="height:34px;"><i class="fa fa-plus"></i></button>
{% else %}
  <button type="button" class="btn btn-success disabled" style="height:34px;"><i class="fa fa-plus"></i></button>
{% endif %}
</div>
</div>
