File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/Symfony/Bridge/Twig/Resources/views/Form Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 167
167
{% set label_attr = label_attr | merge ({class : (label_attr .class |default (' ' ) ~ ' ' ~ parent_label_class )|trim }) %}
168
168
{% endif %}
169
169
{% if label is not same as (false ) and label is empty %}
170
- {% set label = name | humanize %}
170
+ {%- if label_format is not empty -%}
171
+ {% set label = label_format | replace ({
172
+ ' %name%' : name ,
173
+ ' %id%' : id ,
174
+ }) %}
175
+ {%- else -%}
176
+ {% set label = name | humanize %}
177
+ {%- endif -%}
171
178
{% endif %}
172
179
<label {% for attrname , attrvalue in label_attr %} {{ attrname }}=" {{ attrvalue }}" {% endfor %}>
173
180
{{- widget | raw }} {{ label is not same as (false ) ? (translation_domain is same as (false ) ? label : label | trans({}, translation_domain )) -}}
You can’t perform that action at this time.
0 commit comments