Use option[:id] for label's *for* attribute#357
Use option[:id] for label's *for* attribute#357mattbrictson merged 1 commit intobootstrap-ruby:masterfrom duleorlovic:label_for_attribute
Conversation
|
Hi. Thanks for your contribution! As you may have read about in #361, we got a bit behind in handling PRs. Unfortunately, that means we've got several different solutions for some issues now. We're still discussing how to deal with the overlapping/duplicate PRs, and we welcome your comments on that topic. For now, note that much of this PR is also covered by PR #369 (which was PR #346 last year). @mattbrictson your thoughts? |
|
OK, I will check my use cases against master when #369 is merged. |
|
@duleorlovic I'm reopening this because it has work we can use, but please see my review comments which I'll post shortly. |
| class: label_class, | ||
| skip_required: options.delete(:skip_required) | ||
| }) | ||
| }.merge(css_options[:id].present? ? { for: css_options[:id] } : {})) |
There was a problem hiding this comment.
I think this will be redundant when #369 is merged.
|
@duleorlovic Again, I apologize for suggesting that this PR might not be needed. We're trying to make #369 do absolutely one thing only, so this PR is needed to fix the id issue. If the challenge is the merge conflict, let me know. Maybe I can help? |
|
Sure, I can rebase and fix conflicts... I will do it tomorrow, after I use master on some of my projects... |
|
I rebased and forced push so there are no conflicts now... |
mattbrictson
left a comment
There was a problem hiding this comment.
Looks great to me 👍
@lcreid is this good to merge?
lcreid
left a comment
There was a problem hiding this comment.
Nice work! Very clean and elegant solution to an obscure problem.
|
@duleorlovic @mattbrictson I think there's one more issue that this PR could address. Should I open a new issue, or should we include it here? Basically, for text fields, at least, the label's |
|
I think it is best to merge PRs sooner rather than later, so I'll merge this one now and we can open a new issue detailing the problem for text fields. Could you open an issue, @lcreid ? Thanks |
|
Sounds good. I'll make "open a new issue" my default action going forward. |
If provided, use html option
idto specifyforattribute on labelfor (text, email...) fields, checkbox, radio and select.
Solves #213, #221, #342, #349 issues and supercede #221 and #343 pull
requests.
Partially solves #251 (only the part regarding the
id.