Remove "edit-[name]-wrapper" ID from form element wrappers

quicksketch - June 5, 2009 - 04:24
Project:Drupal
Version:7.x-dev
Component:forms system
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

This patch is a continuation of #43493: FAPI: Add name/type as CSS class for form elements, which adds classes to form element wrappers. Since the form element wrapper class and ID will be essentially interchangeable (the class has slight advantages), it makes sense to remove the ID attribute entirely, since it will serve no purpose that the class does not.

AttachmentSizeStatusTest resultOperations
drupal_form_element_remove_wrapper_ids.patch5.16 KBIdleFailed: Invalid PHP syntax in modules/openid/openid.css.View details | Re-test

#1

quicksketch - June 5, 2009 - 04:27
Status:needs review» needs work

Note that the ID attribute needs to actually be removed from the wrapper div in theme_form_element() also, so this still needs work that can be corrected once #43493: FAPI: Add name/type as CSS class for form elements is done.

#2

sun - June 13, 2009 - 22:51

Awesome, subscribing

#3

Dries - June 14, 2009 - 08:05

#4

quicksketch - June 15, 2009 - 23:30
Status:needs work» needs review

Re-rolled with the key lines removed from form.inc. After this patch, "edit-$id-wrapper" IDs are dead. The changes are all really straight-forward, but another set of eyes and searches are in order to make sure I didn't miss any and that I properly updated these.

AttachmentSizeStatusTest resultOperations
drupal_form_element_remove_wrapper_ids.patch6.04 KBIdlePassed: 11576 passes, 0 fails, 0 exceptionsView details | Re-test

#5

System Message - June 30, 2009 - 10:15
Status:needs review» needs work

The last submitted patch failed testing.

#6

quicksketch - July 4, 2009 - 05:27
Status:needs work» needs review

This patch is still ready to go.

#7

sun - July 4, 2009 - 10:15
Status:needs review» reviewed & tested by the community

Testbot confirms.

#8

Dries - July 4, 2009 - 14:57
Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks!

#9

System Message - July 18, 2009 - 15:00
Status:fixed» closed

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

#10

c960657 - August 16, 2009 - 21:39

I think the fix for this issue introduced some regressions - see #550572: CSS+JS regressions related to form-item-[name].

-#edit-type-wrapper, #edit-severity-wrapper {
+.form-item-type-wrapper, .form-item-severity-wrapper {

It seems that these should have been replaced using the following pattern instead, i.e. without the form-item prefix:

-#edit-type-wrapper, #edit-severity-wrapper {
+.type-wrapper, .severity-wrapper {

 
 

Drupal is a registered trademark of Dries Buytaert.