twitter_bootstrap_form_for icon indicating copy to clipboard operation
twitter_bootstrap_form_for copied to clipboard

Add small fixes for bootstrap 3. Add tests.

Open schneikai opened this issue 11 years ago • 4 comments

Hi,

I use this gem in a current Rails 4 project so I added some fixes to make it work better with Bootstrap 3. I also added tests for everything.

Details: I removed the example code for inline. Correct me if I'm wrong but this wasn't TWBS 3 markup. Inline form elements in horizontal forms are also not mentioned in the Bootstrap docs so maybe we should remove this? If it should stay, I think the right markup would be to add a row container and add a column class to every form-group inside that row.

Also the date_select won't render 3 fields on one line without extra markup in TWBS 3 so the old screenshot is wrong. We would need to add extra css to make the 3 select inputs float or wrap them with a row and add column classes like for inline inputs.

Updated the height sizing classes to use input-sm instead of small.

Added the select element styling fix from https://github.com/stouset/twitter_bootstrap_form_for/pull/78

Updated the screenshot.

schneikai avatar Nov 19 '13 09:11 schneikai

The example screenshot no longer has inline form fields, as it does in the original example image.

stouset avatar Nov 19 '13 18:11 stouset

Outside of the comments, it looks good. Thanks.

stouset avatar Nov 19 '13 18:11 stouset

About the inline form fields: I removed the example code for inline. Correct me if I'm wrong but this wasn't TWBS 3 markup. Inline form elements in horizontal forms are also not mentioned in the Bootstrap docs so maybe we should remove this? If it should stay, I think the right markup would be to add a row container and add a column class to every form-group inside that row.

I could add it like this if you want to.

schneikai avatar Nov 21 '13 10:11 schneikai

If we can keep some way to have inline form fields, it would be great. Use your best judgment, though — if TB doesn't support anything like it now, and it looks like any approach would be likely to break in future updates, we should probably abandon it.

stouset avatar Nov 22 '13 08:11 stouset