forked from rebillar/site-accueil-insa
44 lines
1.4 KiB
Twig
44 lines
1.4 KiB
Twig
{% if form_data.errors %}
|
|
<div class="alert alert-warning">
|
|
<strong>{{ 'Installation_PleaseFixTheFollowingErrors'|translate }}:</strong>
|
|
<ul>
|
|
{% for data in form_data.errors %}
|
|
<li>{{ data|raw }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<form {{ form_data.attributes|raw }}>
|
|
{# display any hidden input field #}
|
|
{{ form_data.hidden|join|raw }}
|
|
|
|
{% for fieldname in element_list %}
|
|
{% if form_data[fieldname] is defined %}
|
|
<div class="row form-group">
|
|
<div class="col s12 m12 l6">
|
|
{% if form_data[fieldname].type == 'checkbox' %}
|
|
<label class="checkbox">
|
|
{{ form_data[fieldname].html|raw }}
|
|
</label>
|
|
{% elseif form_data[fieldname].label %}
|
|
<label>
|
|
{{ form_data[fieldname].label|raw }}
|
|
</label>
|
|
{{ form_data[fieldname].html|raw }}
|
|
{% elseif form_data[fieldname].type == 'hidden' %}
|
|
{{ form_data[fieldname].html|raw }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if form_data.submit.html %}
|
|
<div class="row">
|
|
<div class="col s12">
|
|
{{ form_data.submit.html|raw }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</form>
|