add class to div wrapping Add New link

cYu - March 27, 2009 - 19:59
Project:Popups: Add and Reference
Version:6.x-2.0-alpha1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

The suffix that is added to nodereference form elements:

<div>Add New: ' . implode(', ', $links) .'</div>...

could benefit from having a class or id added to the div so that it can more easily be found with css or a jquery selector. My use case deals with removing this link once a node has been added and making it visible again if the nodereference autocomplete field is emptied.

#1

cYu - March 31, 2009 - 14:19
Status:active» needs review

It would also be nice to add this for styling purposes.

AttachmentSize
add_class.patch 900 bytes

#2

zoo33 - April 8, 2009 - 08:04
Category:feature request» bug report
Status:needs review» active

In fact, that markup should be run through a theme function. There is now way right now to theme the output. And the text "Add new" needs to be wrapped in a t() function so that it can be translated. Forgive me for being blunt, but this is a bug.

#3

cYu - April 8, 2009 - 12:51
Status:active» needs work

#4

cYu - April 8, 2009 - 12:58
Category:bug report» feature request
Status:needs work» needs review

zoo33: Can you open a separate bug report for those things and add in that a t() needs added in the _popups_reference_links function? The issues you mention don't really have anything to do with this feature request.

#5

kidrobot - May 8, 2009 - 20:57

Confirming the patch works for me.

 
 

Drupal is a registered trademark of Dries Buytaert.