Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form actions patch #286

Merged
merged 2 commits into from
Aug 21, 2014
Merged

Form actions patch #286

merged 2 commits into from
Aug 21, 2014

Conversation

derpue
Copy link
Contributor

@derpue derpue commented Aug 14, 2014

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

sstok commented Aug 14, 2014

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
Copy link
Member

I agree with @sstok

@derpue
Copy link
Contributor Author

derpue commented Aug 14, 2014

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
@florianeckerstorfer florianeckerstorfer added this to the 2.1 milestone Aug 21, 2014
florianeckerstorfer pushed a commit that referenced this pull request Aug 21, 2014
@florianeckerstorfer florianeckerstorfer merged commit 39efc4c into braincrafted:develop Aug 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants