Permalink
Browse files

fix(groups): correctly format the remove user from group menu item

The menu item was created with a link in a link, which caused a visual
glitch. Menu items support all the required options to handle this in
the menu item.
  • Loading branch information...
jeabakker committed Feb 25, 2016
1 parent 58127a4 commit 8fdf21f5303e709593b59a75eb9e24d263ac83d5
Showing with 3 additions and 8 deletions.
  1. +3 −8 mod/groups/start.php
View
@@ -458,18 +458,13 @@ function groups_user_entity_menu_setup($hook, $type, $return, $params) {
// Add remove link if we can edit the group, and if we're not trying to remove the group owner
if ($group->canEdit() && $group->getOwnerGUID() != $entity->guid) {
- $remove = elgg_view('output/url', array(
+ $return[] = ElggMenuItem::factory([
+ 'name' => 'removeuser',
'href' => "action/groups/remove?user_guid={$entity->guid}&group_guid={$group->guid}",
'text' => elgg_echo('groups:removeuser'),
'confirm' => true,
- ));
-
- $options = array(
- 'name' => 'removeuser',
- 'text' => $remove,
'priority' => 999,
- );
- $return[] = ElggMenuItem::factory($options);
+ ]);
}
}

0 comments on commit 8fdf21f

Please sign in to comment.