Hi

It would be great if you could positions the search link on the right of the input field instead of below it.

Johan

Comments

andypost’s picture

Status: Active » Needs review
StatusFileSize
new1.75 KB

Suppose firstly we need corresponding alter hook

rogical’s picture

Status: Needs review » Needs work
StatusFileSize
new5.51 KB

I applied the patch, it seems still the same.
dd

rogical’s picture

Title: Change link position » Implement hook_references_dialog_widgets_alter
Status: Needs work » Reviewed & tested by the community
rogical’s picture

Status: Reviewed & tested by the community » Fixed

committed.

Status: Fixed » Closed (fixed)

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

davidburns’s picture

How does this allow you to move or alter the link text?

nevermind. it just clicked.

andypost’s picture

+++ b/references_dialog.api.phpundefined
@@ -50,6 +49,20 @@ function hook_references_dialog_widgets() {
+function hook_references_dialog_widgets_alter(&$widgets) {
+  $search = $widgets['entityreference_autocomplete']['operations']['search'];
+  unset($widgets['entityreference_autocomplete']['operations']['search']);
+  $widgets['entityreference_autocomplete']['operations'] = array('search' => $search) + $widgets['entityreference_autocomplete']['operations'];

The example code

sisko’s picture

Hi guys,

can you please help me out and tell me which file we are patching?

I tried both of the following individually:

  • patch references_dialog.dialog_widgets.inc 1416922-refdialog-order-1.patch
  • patch references_dialog.module 1416922-refdialog-order-1.patch

... and neither worked.

andypost’s picture

Patch already commited so implement a hook_references_dialog_widgets_alter(&$widgets) in your custom module to modify the operations' links

gusantor’s picture

Issue summary: View changes

Hello, I'm using this module and need to pass some parameters to referenced node type creation form

so I looked for someway to do it and found this hook_references_dialog_widgets_alter(&$widgets), great !, because I think I can alter the edit/add link url's to include those parameters

but if I do a dpm($widgets) inside my alter function it doesn't seem to work, I'm using

function mymodule_references_dialog_widgets_alter(&$widgets){
dpm($widgets);
}

which is the way I supposed to know the $widgets structure to alter it ?

please any guide is appreciated & thanks in advance