replaced deprecated Twig sameas test by same as
This commit is contained in:
parent
e25aca7072
commit
99a1fcc3e2
@ -9,7 +9,7 @@
|
||||
|
||||
{% block form_label -%}
|
||||
{% spaceless %}
|
||||
{% if label is sameas(false) %}
|
||||
{% if label is same as(false) %}
|
||||
<div class="{{ block('form_label_class') }}"></div>
|
||||
{% else %}
|
||||
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) %}
|
||||
|
@ -166,12 +166,12 @@
|
||||
{% if parent_label_class is defined %}
|
||||
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) %}
|
||||
{% endif %}
|
||||
{% if label is not sameas(false) and label is empty %}
|
||||
{% if label is not same as(false) and label is empty %}
|
||||
{% set label = name|humanize %}
|
||||
{% endif %}
|
||||
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
|
||||
{{- widget|raw -}}
|
||||
{{- label is not sameas(false) ? (translation_domain is sameas(false) ? label : label|trans({}, translation_domain)) -}}
|
||||
{{- label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}}
|
||||
</label>
|
||||
{% endif %}
|
||||
{% endblock checkbox_radio_label %}
|
||||
|
@ -74,13 +74,13 @@
|
||||
{%- block choice_widget_options -%}
|
||||
{% for group_label, choice in options %}
|
||||
{%- if choice is iterable -%}
|
||||
<optgroup label="{{ choice_translation_domain is sameas(false) ? group_label : group_label|trans({}, choice_translation_domain) }}">
|
||||
<optgroup label="{{ choice_translation_domain is same as(false) ? group_label : group_label|trans({}, choice_translation_domain) }}">
|
||||
{% set options = choice %}
|
||||
{{- block('choice_widget_options') -}}
|
||||
</optgroup>
|
||||
{%- else -%}
|
||||
{% set attr = choice.attr %}
|
||||
<option value="{{ choice.value }}" {{ block('attributes') }}{% if choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice_translation_domain is sameas(false) ? choice.label : choice.label|trans({}, choice_translation_domain) }}</option>
|
||||
<option value="{{ choice.value }}" {{ block('attributes') }}{% if choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice_translation_domain is same as(false) ? choice.label : choice.label|trans({}, choice_translation_domain) }}</option>
|
||||
{%- endif -%}
|
||||
{% endfor %}
|
||||
{%- endblock choice_widget_options -%}
|
||||
@ -220,7 +220,7 @@
|
||||
{% set label = name|humanize %}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>{{ translation_domain is sameas(false) ? label : label|trans({}, translation_domain) }}</label>
|
||||
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}</label>
|
||||
{%- endif -%}
|
||||
{%- endblock form_label -%}
|
||||
|
||||
@ -321,9 +321,9 @@
|
||||
{{- " " -}}
|
||||
{%- if attrname in ['placeholder', 'title'] -%}
|
||||
{{- attrname }}="{{ attrvalue|trans({}, translation_domain) }}"
|
||||
{%- elseif attrvalue is sameas(true) -%}
|
||||
{%- elseif attrvalue is same as(true) -%}
|
||||
{{- attrname }}="{{ attrname }}"
|
||||
{%- elseif attrvalue is not sameas(false) -%}
|
||||
{%- elseif attrvalue is not same as(false) -%}
|
||||
{{- attrname }}="{{ attrvalue }}"
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
@ -335,9 +335,9 @@
|
||||
{{- " " -}}
|
||||
{%- if attrname in ['placeholder', 'title'] -%}
|
||||
{{- attrname }}="{{ attrvalue|trans({}, translation_domain) }}"
|
||||
{%- elseif attrvalue is sameas(true) -%}
|
||||
{%- elseif attrvalue is same as(true) -%}
|
||||
{{- attrname }}="{{ attrname }}"
|
||||
{%- elseif attrvalue is not sameas(false) -%}
|
||||
{%- elseif attrvalue is not same as(false) -%}
|
||||
{{- attrname }}="{{ attrvalue }}"
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
@ -349,9 +349,9 @@
|
||||
{{- " " -}}
|
||||
{%- if attrname in ['placeholder', 'title'] -%}
|
||||
{{- attrname }}="{{ attrvalue|trans({}, translation_domain) }}"
|
||||
{%- elseif attrvalue is sameas(true) -%}
|
||||
{%- elseif attrvalue is same as(true) -%}
|
||||
{{- attrname }}="{{ attrname }}"
|
||||
{%- elseif attrvalue is not sameas(false) -%}
|
||||
{%- elseif attrvalue is not same as(false) -%}
|
||||
{{- attrname }}="{{ attrvalue }}"
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
@ -362,9 +362,9 @@
|
||||
{{- " " -}}
|
||||
{%- if attrname in ['placeholder', 'title'] -%}
|
||||
{{- attrname }}="{{ attrvalue|trans({}, translation_domain) }}"
|
||||
{%- elseif attrvalue is sameas(true) -%}
|
||||
{%- elseif attrvalue is same as(true) -%}
|
||||
{{- attrname }}="{{ attrname }}"
|
||||
{%- elseif attrvalue is not sameas(false) -%}
|
||||
{%- elseif attrvalue is not same as(false) -%}
|
||||
{{- attrname }}="{{ attrvalue }}"
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
|
@ -610,7 +610,7 @@
|
||||
<th>{{ option }}</th>
|
||||
<td><pre>{{ value }}</pre></td>
|
||||
<td>
|
||||
{% if data.resolved_options[option] is sameas(value) %}
|
||||
{% if data.resolved_options[option] is same as(value) %}
|
||||
<em>same as passed value</em>
|
||||
{% else %}
|
||||
<pre>{{ data.resolved_options[option] }}</pre>
|
||||
|
Reference in New Issue
Block a user