{{ form_start(form) }}
{# Muestro Errores de Formularios #}
{% if not form.vars.valid %}
<ul class="collection with-header redondearBordes">
<li class="collection-header">
<h6>Errores</h6>
</li>
{% if form.archivos is defined %}
<li class="collection-item">{{ form_errors(form.archivos) }}</li>
{% endif %}
{% if form.imagenes is defined %}
<li class="collection-item">{{ form_errors(form.imagenes) }}</li>
{% endif %}
</ul>
{% endif %}
{# Muestro Errores de Formularios #}
{% for f in form %}
{# Obtengo el tipo de entrada de datos para renderizarlo correctamente#}
{% set tipoInput = f.vars.attr|last %}
{# Captcha #}
{% if tipoInput == "captcha" %}
<div class="input-field col s12">
Ingrese el siguiente codigo de validacion generado por el sistema (CAPTCHA):
{{captcha}}
{{ form_widget(f) }}
<br>
</div>
<br>
{% endif %}
{# Captcha #}
{% if tipoInput == "checkbox" %}
<div class="input-field col s12">
<br>
<label>
{{ form_widget(f) }}
<span>{{f.vars.label}}</span>
</label>
<br>
</div>
{% endif %}
{% if tipoInput == "file" %}
<div class="input-field col s12 file-field">
<div class="btn colorOficial white-text">
<span>{{f.vars.label}}</span>
{{ form_widget(f) }}
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text" placeholder="Adjuntar Archivos">
</div>
</div>
{% endif %}
{% if tipoInput == "multiple" %}
<div class="input-field col s12 file-field">
<div class="btn colorOficial white-text">
<span>{{f.vars.label}}</span>
{{ form_widget(f) }}
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text" placeholder="Adjuntar Archivos">
</div>
</div>
{% endif %}
{% if tipoInput == "button" %}
<div class="input-field col s12">{{ form_widget(f) }}</div>
{% endif %}
{% if tipoInput == "autor" %}
<div class="input-field col s12">
{{ f.vars.label }}
<input id="publicacion_autor" name="publicacion[autor]" type="text" class="validate" value="{{ f.vars.data }}" readonly>
</div>
{% endif %}
{% if tipoInput != "button" and tipoInput != "file" and tipoInput != "multiple" and tipoInput != "checkbox" and tipoInput != "autor" and tipoInput != "captcha" %}
<div class="input-field col s12">{{f.vars.label}}
{{ form_widget(f) }}</div>
{% endif %}
{% endfor %}
{{ form_end(form) }}