Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | add_class.patch | 900 bytes | cYu |
Comments
Comment #1
cYu CreditAttribution: cYu commentedIt would also be nice to add this for styling purposes.
Comment #2
zoo33 CreditAttribution: zoo33 commentedIn 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.Comment #3
cYu CreditAttribution: cYu commentedComment #4
cYu CreditAttribution: cYu commentedzoo33: 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.
Comment #5
hitfactory CreditAttribution: hitfactory commentedConfirming the patch works for me.