Incorrect CSS class for form element wrappers
asimmonds - July 4, 2009 - 23:14
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | forms system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
This is a bug related to issue #43493: FAPI: Add name/type as CSS class for form elements.
If a form element name has a embedded space, then the resulting CSS class would be incorrect for the form element wrapper.
This can be seen on the permissions page when the book module is enabled, the "Create new books" permission's checkboxes are pushed to the right, out of the column (see attached image).
This is due to the class being "form-item form-item-checkbox 1-create new books-wrapper" instead of something like "form-item form-item-checkbox 1-create-new-books-wrapper"
The attached patch adds a space to dash conversion to the special character conversion list for the CSS class string.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| form-inc-space-to-dash.patch | 756 bytes | Idle | Passed: 11563 passes, 0 fails, 0 exceptions | View details |
| permissions_book_bad_css_class.png | 4.6 KB | Ignored | None | None |

#1
#2
Committed to CVS HEAD. Thanks!
#3
Automatically closed -- issue fixed for 2 weeks with no activity.