Since we have the "Remove" label on the left side checkbox, it may be useful to have an "Add" label on the right side checkbox. Sorry, the most recent commit is included in this diff as well.
--- entityreference_view_widget.a/entityreference_view_widget.module 2011-10-07 11:49:33.000000000 -0400
+++ entityreference_view_widget.b/entityreference_view_widget.module 2011-10-17 02:54:20.000000000 -0400
@@ -330,10 +330,12 @@
// displayed through the view.
$substitutions = array();
foreach ($view->result as $key => $result) {
- $entity_id = reset($result);
+ //$entity_id = reset($result);
+ $entity_id = $result->{$view->base_field};
$element['add'][$entity_id] = array(
'#type' => 'checkbox',
'#refresh_items' => TRUE,
+ '#title' => t('Add'),
'#ajax' => array(
'path' => 'entityreference_view_widget/ajax/' . $field_name,
'wrapper' => 'edit-' . str_replace('_', '-', $field_name),
Comments
Comment #1
bojanz commentedClosing old issue.
Recent work is happening in the 2.x branch.