Download & Extend

Incorrect CSS class for form element wrappers

Project:Drupal core
Version:7.x-dev
Component:forms system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
form-inc-space-to-dash.patch756 bytesIdlePassed: 11563 passes, 0 fails, 0 exceptionsView details
permissions_book_bad_css_class.png4.6 KBIgnored: Check issue status.NoneNone

Comments

#1

Status:needs review» reviewed & tested by the community

#2

Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks!

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here