Unnecessary prefix on field 'add more' $form element

yched - November 9, 2009 - 00:57
Project:Drupal
Version:7.x-dev
Component:field system
Category:task
Priority:minor
Assigned:Unassigned
Status:closed
Description

Pointed by sun while discussing #626354: Remove #process pattern from number field:
We don't need to prefix the key of the 'add more' button in the $form structure - basically:

-      $form_element[$field_name . '_add_more'] = array(
+      $form_element['add_more'] = array(

Unneeded cruft, the #name property already contains all the info needed to differentiate between the several buttons in the page.

AttachmentSizeStatusTest resultOperations
field_rename_add_more.patch1.65 KBIdlePassed: 14701 passes, 0 fails, 0 exceptionsView details | Re-test

#1

yched - November 9, 2009 - 15:49
Component:simpletest.module» field system

Doh, FF preselected a wrong component for me...

#2

sun - November 9, 2009 - 16:30
Status:needs review» reviewed & tested by the community

No, that's Dreditor :) It stores the last selected component for each project. ;)

Can you roll patches with diff -up, please, so we can see the context of the changes? :)

#3

yched - November 9, 2009 - 16:33

ach - I new I started seeing this at some point, but did not connect with dreditor.

diff -up: I know, sorry, Eclipse patches here :-(

#4

Dries - November 9, 2009 - 18:23
Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks!

#5

System Message - November 23, 2009 - 18:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.