Skip to content

Commit

Permalink
bug #30505 [TwigBridge] Remove usages of the spaceless tag (nicolas-g…
Browse files Browse the repository at this point in the history
…rekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Remove usages of the spaceless tag

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The spaceless tag is deprecated since version 2.7.

Commits
-------

2ee178b [TwigBridge] Remove use spaceless tag
  • Loading branch information
nicolas-grekas committed Mar 10, 2019
2 parents d583f80 + 2ee178b commit c6a35ac
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 29 deletions.
@@ -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 %}
@@ -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 %}
@@ -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 %}
@@ -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 %}

0 comments on commit c6a35ac

Please sign in to comment.