Skip to content

Conversation

@donv
Copy link
Collaborator

@donv donv commented Apr 24, 2017

Fixes #147 for Bootstrap 4

@mattbrictson
Copy link
Contributor

Thanks for putting this together! Can you take a look into the test failure?

@mattbrictson
Copy link
Contributor

Looks good 👍

@mattbrictson mattbrictson merged commit 16d82d6 into bootstrap-ruby:bootstrap-v4 Apr 24, 2017
mattbrictson pushed a commit that referenced this pull request Jan 7, 2018
* Support :prepend and :append for the `select` helper
Fixes #147

* Bootstrap 4 has renamed `control-label` to `form-control-label`
mattbrictson pushed a commit that referenced this pull request Jan 26, 2018
* has-error is now has-danger

* inputs with errors should have form-control-feedback

* control-label is now form-control-label

* btn-default is now btn-secondary

* form-horizontal is no longer a required class

* input field should have form-control-danger on error

* checkbox is now form-check

* checkbox input should have form-check-input

* non inline checkbox labels should have form-check-label

* Support :prepend and :append for the `select` helper (#327)

* Support :prepend and :append for the `select` helper
Fixes #147

* Bootstrap 4 has renamed `control-label` to `form-control-label`

* `form_with` mostly working.

The main changes were around the fact that `form_with` doesn't
automatically add class and id attributes in many places that the
other form builders did.

Added a `for:` to the label options if an ID was specified for
the input element, so that the label would get the correct value
for the `for` attribute.

Sub-classed the form builder to override methods to make `form_with`
work without the default Rails-generated DOM IDs.

* Make it parse under Ruby 1.9.2

The `bootstrap_form_with` helper uses Ruby 2+ syntax. I put a test
for the Rails version, so the helper is only parse if running
Rails 5.1+.

* Try another way to fix Ruby 1.9.2 parse problem.

* Try Ruby 1.9.2 syntax yet again.

* Close, but going to try keying on Rails ID generation.

* Using the underlying option for id generation works.

* Use fields instead of fields_for.

* Finally remove FormBuilderFormWith.

* Remove some unnecessary diffs.

Remove confusing comment.

Remove some more unnecessary diffs.

* Fix select test case for :prepend, :append.

* Fix test case that hadn't been converted to form_with.

* Documentation tests.
Rails 5.2 not tested yet.

* Fix out-of-date HTML in test case.

* Uncomment and fix Rails 5.1 collection_radio_button tests.

* Fix README to remove false statements about 5.2.

* heredoc

* bootstrap_form_with_test working with 5.1 and 5.2.

* Handle Rails 5.1 and 5.2+.

* Use heredoc.strip.

* Comments and more heredoc formatting.

* Partially updated test cases.

* Don't add class="" to label if no classes specified.

* Intermediate check-in.

* Intermediate.

* Intermediate.

* Intermediate.

* Most of custom IDs working.

* Uncomment test cases.

* Resolve conflicts.

* Saving work with tests red and debugging.

* Commit before saving to future branch.

* Delete redundant test files.

* Remove puts and TODOs.

* Tests passing up to Rails 5.1.

* Some tests for form_with. All pass.

* Documentation tested.

* Update Rails 5.1 examples in documentation.

* Pin minitest to exactly 5.10.1 for Rails 5.0.

* Fence off one form_with test.

* Add tests for fields method. Pass when they shouldn't.

* Go back to using minitest 5.10.3 to do bisect.

* Test only form_for in one case.
The time zone text strings have an "&" in them. When it's converted to
XML and then back to a string, the "&" gets lost.

* Test and show that bootstrap_form fields helper not needed

* Remove unwanted tests.

* Feedback from review.
Removed unneeded documentation.
Moved `bootstrap_form_with` to after `bootstrap_form_for`.

* Minimize test cases.

* Fix mistaken commit of version.

* Remove code per review.

* Remove duplicate CHANGELOG entry
@lcreid
Copy link
Contributor

lcreid commented Feb 8, 2018

@donv, was there a reason why this was only added for select, and not collection_select or grouped_collection_select?

@donv
Copy link
Collaborator Author

donv commented Feb 9, 2018

No, no reason.

lcreid added a commit to lcreid/rails-bootstrap-forms that referenced this pull request Jun 4, 2018
* has-error is now has-danger

* inputs with errors should have form-control-feedback

* control-label is now form-control-label

* btn-default is now btn-secondary

* form-horizontal is no longer a required class

* input field should have form-control-danger on error

* checkbox is now form-check

* checkbox input should have form-check-input

* non inline checkbox labels should have form-check-label

* Support :prepend and :append for the `select` helper (bootstrap-ruby#327)

* Support :prepend and :append for the `select` helper
Fixes bootstrap-ruby#147

* Bootstrap 4 has renamed `control-label` to `form-control-label`

* `form_with` mostly working.

The main changes were around the fact that `form_with` doesn't
automatically add class and id attributes in many places that the
other form builders did.

Added a `for:` to the label options if an ID was specified for
the input element, so that the label would get the correct value
for the `for` attribute.

Sub-classed the form builder to override methods to make `form_with`
work without the default Rails-generated DOM IDs.

* Make it parse under Ruby 1.9.2

The `bootstrap_form_with` helper uses Ruby 2+ syntax. I put a test
for the Rails version, so the helper is only parse if running
Rails 5.1+.

* Try another way to fix Ruby 1.9.2 parse problem.

* Try Ruby 1.9.2 syntax yet again.

* Close, but going to try keying on Rails ID generation.

* Using the underlying option for id generation works.

* Use fields instead of fields_for.

* Finally remove FormBuilderFormWith.

* Remove some unnecessary diffs.

Remove confusing comment.

Remove some more unnecessary diffs.

* Fix select test case for :prepend, :append.

* Fix test case that hadn't been converted to form_with.

* Documentation tests.
Rails 5.2 not tested yet.

* Fix out-of-date HTML in test case.

* Uncomment and fix Rails 5.1 collection_radio_button tests.

* Fix README to remove false statements about 5.2.

* heredoc

* bootstrap_form_with_test working with 5.1 and 5.2.

* Handle Rails 5.1 and 5.2+.

* Use heredoc.strip.

* Comments and more heredoc formatting.

* Partially updated test cases.

* Don't add class="" to label if no classes specified.

* Intermediate check-in.

* Intermediate.

* Intermediate.

* Intermediate.

* Most of custom IDs working.

* Uncomment test cases.

* Resolve conflicts.

* Saving work with tests red and debugging.

* Commit before saving to future branch.

* Delete redundant test files.

* Remove puts and TODOs.

* Tests passing up to Rails 5.1.

* Some tests for form_with. All pass.

* Documentation tested.

* Update Rails 5.1 examples in documentation.

* Pin minitest to exactly 5.10.1 for Rails 5.0.

* Fence off one form_with test.

* Add tests for fields method. Pass when they shouldn't.

* Go back to using minitest 5.10.3 to do bisect.

* Test only form_for in one case.
The time zone text strings have an "&" in them. When it's converted to
XML and then back to a string, the "&" gets lost.

* Test and show that bootstrap_form fields helper not needed

* Remove unwanted tests.

* Feedback from review.
Removed unneeded documentation.
Moved `bootstrap_form_with` to after `bootstrap_form_for`.

* Minimize test cases.

* Fix mistaken commit of version.

* Remove code per review.

* Remove duplicate CHANGELOG entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants