edit.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Group edit form
  4. *
  5. * @package ElggGroups
  6. */
  7. /* @var ElggGroup $entity */
  8. $entity = elgg_extract("entity", $vars, false);
  9. // context needed for input/access view
  10. elgg_push_context("group-edit");
  11. // build the group profile fields
  12. echo elgg_view("groups/edit/profile", $vars);
  13. // build the group access options
  14. echo elgg_view("groups/edit/access", $vars);
  15. // build the group tools options
  16. echo elgg_view("groups/edit/tools", $vars);
  17. // display the save button and some additional form data
  18. ?>
  19. <div class="elgg-foot">
  20. <?php
  21. if ($entity) {
  22. echo elgg_view("input/hidden", array(
  23. "name" => "group_guid",
  24. "value" => $entity->getGUID(),
  25. ));
  26. }
  27. echo elgg_view("input/submit", array("value" => elgg_echo("save")));
  28. if ($entity) {
  29. $delete_url = "action/groups/delete?guid=" . $entity->getGUID();
  30. echo elgg_view("output/url", array(
  31. "text" => elgg_echo("groups:delete"),
  32. "href" => $delete_url,
  33. "confirm" => elgg_echo("groups:deletewarning"),
  34. "class" => "elgg-button elgg-button-delete float-alt",
  35. ));
  36. }
  37. elgg_pop_context();
  38. ?>
  39. </div>