[TwigBridge] Remove use spaceless tag

This commit is contained in:
Nicolas Grekas 2019-03-10 10:14:34 +01:00
parent e9c8e19f46
commit 2ee178b5c5
4 changed files with 17 additions and 29 deletions

View File

@ -1,25 +1,19 @@
{% block _text_id_widget %}
{% spaceless %}
{% block _text_id_widget -%}
<div id="container">
{{ form_widget(form) }}
{{- form_widget(form) -}}
</div>
{% endspaceless %}
{% endblock _text_id_widget %}
{%- endblock _text_id_widget %}
{% block _names_entry_label %}
{% spaceless %}
{% block _names_entry_label -%}
{% if label is empty %}
{% set label = name|humanize %}
{% endif %}
{%- set label = name|humanize -%}
{% endif -%}
<label>Custom label: {{ label|trans({}, translation_domain) }}</label>
{% endspaceless %}
{% endblock _names_entry_label %}
{%- endblock _names_entry_label %}
{% block _name_c_entry_label %}
{% spaceless %}
{% block _name_c_entry_label -%}
{% if label is empty %}
{% set label = name|humanize %}
{% endif %}
{%- set label = name|humanize -%}
{% endif -%}
<label>Custom name label: {{ label|trans({}, translation_domain) }}</label>
{% endspaceless %}
{% endblock _name_c_entry_label %}
{%- endblock _name_c_entry_label %}

View File

@ -1,6 +1,4 @@
{% block form_widget_simple %}
{% spaceless %}
{% set type = type|default('text') %}
{%- set type = type|default('text') -%}
<input type="{{ type }}" {{ block('widget_attributes') }} value="{{ value }}" rel="theme" />
{% endspaceless %}
{% endblock form_widget_simple %}
{%- endblock form_widget_simple %}

View File

@ -1,8 +1,6 @@
{% extends 'form_div_layout.html.twig' %}
{% block form_widget_simple %}
{% spaceless %}
{% set type = type|default('text') %}
{%- set type = type|default('text') -%}
<input type="{{ type }}" {{ block('widget_attributes') }} value="{{ value }}" rel="theme" />
{% endspaceless %}
{% endblock form_widget_simple %}
{%- endblock form_widget_simple %}

View File

@ -1,8 +1,6 @@
{% use 'form_div_layout.html.twig' %}
{% block form_widget_simple %}
{% spaceless %}
{% set type = type|default('text') %}
{%- set type = type|default('text') -%}
<input type="{{ type }}" {{ block('widget_attributes') }} value="{{ value }}" rel="theme" />
{% endspaceless %}
{% endblock form_widget_simple %}
{%- endblock form_widget_simple %}