invite.php 725 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Elgg groups invite form
  4. *
  5. * @package ElggGroups
  6. */
  7. $group = $vars['entity'];
  8. $owner = $group->getOwnerEntity();
  9. $forward_url = $group->getURL();
  10. $friends = elgg_get_logged_in_user_entity()->getFriends(array('limit' => 0));
  11. if ($friends) {
  12. echo elgg_view('input/friendspicker', array('entities' => $friends, 'name' => 'user_guid', 'highlight' => 'all'));
  13. echo '<div class="elgg-foot">';
  14. echo elgg_view('input/hidden', array('name' => 'forward_url', 'value' => $forward_url));
  15. echo elgg_view('input/hidden', array('name' => 'group_guid', 'value' => $group->guid));
  16. echo elgg_view('input/submit', array('value' => elgg_echo('invite')));
  17. echo '</div>';
  18. } else {
  19. echo elgg_echo('groups:nofriendsatall');
  20. }