Form actions patch by derpue · Pull Request #286 · braincrafted/bootstrap-bundle
Conversation
Currently to get different coloured buttons you had to have a something like "type" => "danger"in the attr array. Since all entries in attr are rendered into markup in button_attributes block, you end up with two type attributes in your markup.
This ButtonExtension introduces a new option buttonclass for that purpose.
In addition it also provides the possibility to render an <a>-tag as BS-styled button using the option "asatag" => true and having the href in the attr array.
I think its better to use underscores for clarity, button_class instead of buttonclass and as_link instead of asatag.
Besides the comment, +1 from me.
* fixes double 'type' in markup bug * allows usage of BS-Button styled <a>-Tag * (+1 squashed commits) Squashed commits: [6f1d0e4] renaming button extensions new options for better clarity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters