f.button overrides default rails FormBuilder f.button? #449

Closed
rubylibre opened this Issue Feb 12, 2012 · 7 comments

Comments

Projects
None yet
3 participants
@rubylibre

Am I correct?

@rafaelfranca

This comment has been minimized.

Show comment Hide comment
@rafaelfranca

rafaelfranca Feb 12, 2012

Collaborator

Yeah. Are you with any issue? I think that we need to change it to work with Rails 3.2 too cc/ @carlosantoniodasilva

Collaborator

rafaelfranca commented Feb 12, 2012

Yeah. Are you with any issue? I think that we need to change it to work with Rails 3.2 too cc/ @carlosantoniodasilva

@rubylibre

This comment has been minimized.

Show comment Hide comment
@rubylibre

rubylibre Feb 12, 2012

Not directly. I am playing with twitter bootstrap and for that to work, all form 'buttons' need to be buttons.
It has something to do with Firefox default line-height for input elements. (default value is: normal !important)

When using a input[type="submit"] next to a cancel link, both styled with bootstrap, you will see the difference (in Firefox).

BTW thank you for simple_form!

Not directly. I am playing with twitter bootstrap and for that to work, all form 'buttons' need to be buttons.
It has something to do with Firefox default line-height for input elements. (default value is: normal !important)

When using a input[type="submit"] next to a cancel link, both styled with bootstrap, you will see the difference (in Firefox).

BTW thank you for simple_form!

@rafaelfranca

This comment has been minimized.

Show comment Hide comment
@rafaelfranca

rafaelfranca Feb 12, 2012

Collaborator

Thank you to report this. I'll work to do the f.button use the Rails 3.2 helper. Thanks

Collaborator

rafaelfranca commented Feb 12, 2012

Thank you to report this. I'll work to do the f.button use the Rails 3.2 helper. Thanks

@carlosantoniodasilva

This comment has been minimized.

Show comment Hide comment
@carlosantoniodasilva

carlosantoniodasilva Feb 12, 2012

Collaborator

Yeah, I think I've already got into that, when using input[submit] and a reset button. I've changed the reset to be input[type=reset] at that time, which worked fine.

The issue is that Rails uses f.button to create a button, and f.submit a input type=submit. SimpleForm uses f.button to delegate to Rails' submit which will create a input type=submit. Not sure how to handle that yet, but we'll check. Thanks.

Collaborator

carlosantoniodasilva commented Feb 12, 2012

Yeah, I think I've already got into that, when using input[submit] and a reset button. I've changed the reset to be input[type=reset] at that time, which worked fine.

The issue is that Rails uses f.button to create a button, and f.submit a input type=submit. SimpleForm uses f.button to delegate to Rails' submit which will create a input type=submit. Not sure how to handle that yet, but we'll check. Thanks.

@rubylibre

This comment has been minimized.

Show comment Hide comment
@rubylibre

rubylibre Feb 13, 2012

Hi Carlos,

That is it. In much better words than mine :)
Most of the time no reset is used (actually never) but a cancel link styled as a button...

Hi Carlos,

That is it. In much better words than mine :)
Most of the time no reset is used (actually never) but a cancel link styled as a button...

@carlosantoniodasilva

This comment has been minimized.

Show comment Hide comment
@carlosantoniodasilva

carlosantoniodasilva Feb 14, 2012

Collaborator

Hey @rubylibre, please give it a try and let us know about any issue. Thanks.

Collaborator

carlosantoniodasilva commented Feb 14, 2012

Hey @rubylibre, please give it a try and let us know about any issue. Thanks.

@rubylibre

This comment has been minimized.

Show comment Hide comment
@rubylibre

rubylibre Feb 14, 2012

Hi the code works like a charm, thanks!

( Seems that bootstraps button isn't that consistently styled. The button and link have different vertical alignment when styled as button. )

Hi the code works like a charm, thanks!

( Seems that bootstraps button isn't that consistently styled. The button and link have different vertical alignment when styled as button. )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment