Form actions patch by derpue · Pull Request #286 · braincrafted/bootstrap-bundle

Conversation

@derpue

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.

@sstok

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.

@florianeckerstorfer

@derpue

Yes, your both absolutely right

* 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

Labels