diff --git a/app/Resources/views/form/layout.html.twig b/app/Resources/views/form/layout.html.twig new file mode 100644 index 000000000..cab7964b0 --- /dev/null +++ b/app/Resources/views/form/layout.html.twig @@ -0,0 +1,16 @@ +{% extends 'bootstrap_3_layout.html.twig' %} + +{# Errors #} + +{% block form_errors -%} + {% if errors|length > 0 -%} + {% if form.parent %}{% else %}
{% endif %} + + {% if form.parent %}{% else %}
{% endif %} + {%- endif %} +{%- endblock form_errors %} diff --git a/app/config/config.yml b/app/config/config.yml index bc8fcdd6b..71d345a78 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -55,7 +55,7 @@ twig: debug: "%kernel.debug%" strict_variables: "%kernel.debug%" form_themes: - - "bootstrap_3_layout.html.twig" + - "form/layout.html.twig" - "form/fields.html.twig" # Doctrine Configuration (used to access databases and manipulate their information) @@ -63,7 +63,7 @@ doctrine: dbal: # if you don't want to use SQLite, change the URL in parameters.yml or set the DATABASE_URL environment variable url: "%env(DATABASE_URL)%" - + # instead of using a URL, you may also uncomment the following lines to configure your database # driver: pdo_mysql # host: "%database_host%"