{% import "Admin/macros.html.twig" as macros_admin %} {% for o in form.children %} {% set input = o.vars.block_prefixes[o.vars.block_prefixes|length-2] %} {% set infos = o.vars.attr.infos is defined ? o.vars.attr.infos %} {% set class = o.vars.attr.class is defined ? o.vars.attr.class %} {% set id = o.vars.id %} {% if 'half' not in class and 'third' not in class and 'quarter' not in class and 'w100' not in class %} {% set class = childClass is defined ? class~' '~childClass %} {% endif %} {% if 'half' not in class and 'third' not in class and 'quarter' not in class and 'w100' not in class %} {% set class = class~' w100' %} {% endif %} {% set subclass = "hz-20-in vt-10-in w100 p adapt border border-gray bg-white w100 radius-10 " %} {% if o.vars.name != "_token" %}
{% if o.vars.label %} {% endif %} {% if input == 'villages' %}
{{form_widget(o,{attr:{'class':'nopadding'}})}}
{% elseif input == 'documents' %}
{{macros_admin.os_document(o)}}
{% elseif input == 'pictures' %}
{{macros_admin.os_picture(o)}}
{% elseif input == 'biblios' %}
{{macros_admin.os_documents(o)}}
{% do o.setRendered() %} {% elseif o.vars.choices is defined and o.vars.expanded is defined and o.vars.expanded and o.vars.multiple is defined and not o.vars.multiple %} {% for k in o.vars.choices %}
{% endfor %} {% do o.setRendered() %} {# {% elseif o.vars.choices is defined and o.vars.expanded is defined and not o.vars.expanded %}
{% do o.setRendered() %} #} {% else %} {{form_widget(o,{attr:{placeholder: o.vars.required ? "Obligatoire" : "Facultatif", class:subclass~(o.vars.attr.class is defined ? o.vars.attr.class)}})}} {% endif %} {% if infos %}
{{infos|raw}}
{% endif %}
{% endif %} {% endfor %} {% do form.setRendered() %}