File tree Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ CHANGELOG
55---
66
77 * Add ` access_decision() ` and ` access_decision_for_user() ` Twig functions
8+ * Call ` form_label_content ` inside ` button_widget ` block to render button label
89
9107.3
1011---
Original file line number Diff line number Diff line change 226226{%- endblock range_widget %}
227227
228228{%- block button_widget -%}
229- {%- if not label -%}
230- {%- if label_format is not empty -%}
231- {% set label = label_format | replace ({
232- ' %name%' : name ,
233- ' %id%' : id ,
234- }) %}
235- {%- elseif label is not same as (false ) -%}
236- {% set label = name | humanize %}
237- {%- endif -%}
238- {%- endif -%}
239229 <button type =" {{ type | default (' button' ) }}" {{ block (' button_attributes' ) }}>
240- {%- if translation_domain is same as (false ) -%}
241- {%- if label_html is same as (false ) -%}
242- {{- label -}}
243- {%- else -%}
244- {{- label | raw -}}
245- {%- endif -%}
246- {%- else -%}
247- {%- if label_html is same as (false ) -%}
248- {{- label | trans(label_translation_parameters , translation_domain ) -}}
249- {%- else -%}
250- {{- label | trans(label_translation_parameters , translation_domain )| raw -}}
251- {%- endif -%}
252- {%- endif -%}
230+ {{- block (' form_label_content' ) -}}
253231 </button >
254232{%- endblock button_widget -%}
255233
You can’t perform that action at this time.
0 commit comments