Changed form validation to support Bootstrap 4.0.0.beta#345
Changed form validation to support Bootstrap 4.0.0.beta#345CyberDeck wants to merge 19 commits intobootstrap-ruby:bootstrap-v4from
Conversation
) * Support :prepend and :append for the `select` helper Fixes bootstrap-ruby#147 * Bootstrap 4 has renamed `control-label` to `form-control-label`
- form-control-danger is replaced with is-invalid for Bootstrap 4.0.0.beta - form-control-feedback is replaced with invalid-feedback for Bootstrap 4.0.0.beta - help texts are rendered with <small> tag instead of <span> tag, i.e. like in Bootstrap 4.0.0.beta Features: - is-valid will be applied to validated form field (i.e. not on unchanged or new records)
|
Any ideas how I can get the Travis CI build tests passed? And yeah, locally it runs all tests fine (TM). Btw, my PR includes the changes from #340. |
| test 'collection_check_boxes renders the form_group correctly' do | ||
| collection = [Address.new(id: 1, street: 'Foobar')] | ||
| expected = %{<input id="user_misc" multiple="multiple" name="user[misc][]" type="hidden" value="" /><div class="form-group"><label class="form-control-label" for="user_misc">This is a checkbox collection</label><div class="form-check"><label class="form-check-label" for="user_misc_1"><input class="form-check-input" id="user_misc_1" name="user[misc][]" type="checkbox" value="1" /> Foobar</label></div><span class="form-text text-muted">With a help!</span></div>} | ||
| expected = %{<input id="user_misc" multiple="multiple" name="user[misc][]" type="hidden" value="" /><div class="form-group"><label class="form-control-label" for="user_misc">This is a checkbox collection</label><div class="form-check"><label class="form-check-label" for="user_misc_1"><input class="form-check-input" id="user_misc_1" name="user[misc][]" type="checkbox" value="1" /> Foobar</label></div><small class="form-text text-muted">With a help!</span></div>} |
There was a problem hiding this comment.
Here an a number of other places you changed the <span> to a <small>, but the closing tag is still a </span>. I doubt that's causing your Travis problem, but it's worth noting.
There was a problem hiding this comment.
I fixed these issues with commit 6085f8c.
However, I needed to change more in test/test_helper.rb to get "rake test" for all versions working. Probably the branch bootstrap-v4 should include latest changes from "master" to resolve all Travis test issues?!
|
After merging current head of master, all checks are passed successfully. However, I am unsure about my changes to the test/test_helper.rb file... Do they make sense for you? |
|
Can this be merged into bootstrap-v4? :) |
|
Would be awesome to have this merged 👍 |
|
I found a bug where forms for new records may appear as "validated" by default (details). Not sure where the best place to report it is... |
|
How is this looking now? |
Update README.md
16d82d6 to
a68a242
Compare
|
Thanks for your contribution! As you may have read about in issue #361, we got a bit behind in merging PRs (please read that issue if you haven't yet). Sorry! The master branch is now where we're working on Bootstrap 4 support. I've been told that the best thing to do is submit a new PR for these changes against master, and close this one (@mattbrictson, is that true?). However, if you know an easier way, by all means go ahead. Please note that a number of overlapping PRs had built up over the last six months, so some of this PR may have already been addressed by other PRs. Apologies again for the delay in responding. |
|
Yes, all things considered it might be easier to recreate this PR against Are you still interested in getting the PR cleaned up and ready, @CyberDeck? We'd very much appreciate the help. Thanks, and again sorry for the slow response on our part! |
|
Count me in. I will prepare a new PR against master. For the meantime, I will close this one. |
…strap-ruby#345) (bootstrap-ruby#370) * New PR to replace PR bootstrap-ruby#345 * Removed has_danger and form-control-label * Removed 'is-valid' * Removed wrong line from Changelog * Update html help test with latest v4 help markup
Bugfix:
Features: