Skip to content

Commit

Permalink
bug #29115 Change button_widget class to btn-primary (neFAST)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nicolas-grekas committed Nov 8, 2018
2 parents d74a4eb + 59003bf commit 5916bbe
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -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 -%}
Expand Down

0 comments on commit 5916bbe

Please sign in to comment.