{% extends "eZDemoBundle::pagelayout.html.twig" %} {# Customizing the error message to add a css class since form_errors doesn't accept parameters #} {% form_theme form _self %} {% block form_errors %} {% if errors|length > 0 %} {% for error in errors %} {{ error.message }} {% if not loop.last %},{% endif %} {% endfor %} {% endif %} {% endblock form_errors %} {% block content %}

{{ ez_render_field( content, 'name' ) }}

{{ ez_render_field( content, 'description' ) }}
{% for flashMessage in app.session.flashbag.get('notice') %}

{{ flashMessage }}

{% else %} {{ form_start( form ) }}
{{ form_errors( form ) }}
{{ form_label( form.firstName, 'First Name'|trans, { 'attr': {'class': 'control-label'}} ) }}
{{ form_widget( form.firstName, { 'attr': {'class': 'span4'}} ) }} {{ form_errors( form.firstName ) }}
{{ form_label( form.lastName, 'Last Name'|trans, { 'attr': {'class': 'control-label'}} ) }}
{{ form_widget( form.lastName, { 'attr': {'class': 'span4'}} ) }} {{ form_errors( form.lastName ) }}
{{ form_label( form.email, 'Email'|trans, { 'attr': {'class': 'control-label'}} ) }}
{{ form_widget( form.email, { 'attr': {'class': 'span6'}} ) }} {{ form_errors( form.email ) }}
{{ form_label( form.subject, 'Subject'|trans, { 'attr': {'class': 'control-label'}} ) }}
{{ form_widget( form.subject, { 'attr': {'class': 'span6'}} ) }} {{ form_errors( form.subject ) }}
{{ form_label( form.country, 'Country'|trans, { 'attr': {'class': 'control-label'}} ) }}
{{ form_widget( form.country ) }} {{ form_errors( form.country ) }}
{{ form_label( form.message, 'Message'|trans, { 'attr': {'class': 'control-label'}} ) }}
{{ form_widget( form.message, { 'attr': {'class': 'span8', 'rows': '10'} } ) }} {{ form_errors( form.message ) }}
{{ form_widget( form.save, { 'label': "Send form"|trans, 'attr': { 'class': 'btn btn-warning pull-right' } } ) }} {{ form_end( form ) }} {% endfor %}
{% endblock %}