8000 bug #29115 Change button_widget class to btn-primary (neFAST) · symfony/symfony@5916bbe · GitHub
[go: up one dir, main page]

Skip to content

Commit 5916bbe

Browse files
bug #29115 Change button_widget class to btn-primary (neFAST)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #29115). Discussion ---------- Change button_widget class to btn-primary FIX #29114 | Q | A | ------------- | --- | Branch? | master for features / 2.8 up to 4.1 for bug fixes <!-- see below --> | Bug fix? | yes | New feature? | no | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #29114 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Change button_widget class to btn-primary in Bootstrap 4 twig template Commits ------- 59003bf Change button_widget class to btn-primary
2 parents d74a4eb + 59003bf commit 5916bbe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@
137137
{{- parent() -}}
138138
{%- endblock button_widget %}
139139

140+
{% block submit_widget -%}
141+
{%- set attr = attr|merge({class: (attr.class|default('btn-primary'))|trim}) -%}
142+
{{- parent() -}}
143+
{%- endblock submit_widget %}
144+
140145
{% block checkbox_widget -%}
141146
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
142147
{%- if 'checkbox-custom' in parent_label_class -%}
0