Use spaceless balises in Twig templates

This commit is contained in:
Mathieu Piot 2018-03-22 18:23:35 +01:00
parent 8b937ff43f
commit c74e0dc2da
4 changed files with 9 additions and 9 deletions

View File

@ -158,7 +158,7 @@
{# Help #}
{% block form_help -%}
{% if help is not empty %}
{%- if help is not empty -%}
<span id="{{ id }}_help" class="help-block">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</span>
{% endif %}
{%- endif -%}
{%- endblock form_help %}

View File

@ -285,7 +285,7 @@
{# Help #}
{% block form_help -%}
{% if help is not empty %}
{%- if help is not empty -%}
<small id="{{ id }}_help" class="form-text text-muted">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</small>
{% endif %}
{%- endif -%}
{%- endblock form_help %}

View File

@ -290,9 +290,9 @@
{# Help #}
{% block form_help -%}
{% if help is not empty %}
{%- if help is not empty -%}
<p id="{{ id }}_help" class="help-text">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</p>
{% endif %}
{%- endif -%}
{%- endblock form_help %}
{# Rows #}

View File

@ -273,10 +273,10 @@
{%- endif -%}
<div class="row">
<div class="large-12 columns{% if (not compound or force_error|default(false)) and not valid %} error{% endif %}">
{{ form_label(form) }}
{{- form_label(form) -}}
{{- form_widget(form, widget_attr) -}}
{{ form_help(form) }}
{{ form_errors(form) }}
{{- form_help(form) -}}
{{- form_errors(form) -}}
</div>
</div>
{%- endblock form_row %}