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
-------

59003bf27a Change button_widget class to btn-primary
This commit is contained in:
Nicolas Grekas 2018-11-08 22:50:30 +01:00
commit 5916bbe743
1 changed files with 5 additions and 0 deletions

View File

@ -137,6 +137,11 @@
{{- parent() -}}
{%- endblock button_widget %}
{% block submit_widget -%}
{%- set attr = attr|merge({class: (attr.class|default('btn-primary'))|trim}) -%}
{{- parent() -}}
{%- endblock submit_widget %}
{% block checkbox_widget -%}
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
{%- if 'checkbox-custom' in parent_label_class -%}