edit.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 "<div id='group-tools-group-edit-profile' class='group-tools-group-edit-section'>";
  13. echo elgg_view("groups/edit/profile", $vars);
  14. echo "</div>";
  15. // build the group access options
  16. echo "<div id='group-tools-group-edit-access' class='group-tools-group-edit-section hidden'>";
  17. echo elgg_view("groups/edit/access", $vars);
  18. echo "</div>";
  19. // build the group tools options
  20. echo "<div id='group-tools-group-edit-tools' class='group-tools-group-edit-section hidden'>";
  21. echo elgg_view("groups/edit/tools", $vars);
  22. echo "</div>";
  23. // display the save button and some additional form data
  24. ?>
  25. <div class="elgg-foot">
  26. <?php
  27. if ($entity) {
  28. echo elgg_view("input/hidden", array(
  29. "name" => "group_guid",
  30. "value" => $entity->getGUID(),
  31. ));
  32. }
  33. echo elgg_view("input/submit", array("value" => elgg_echo("save")));
  34. if ($entity) {
  35. $delete_url = "action/groups/delete?guid=" . $entity->getGUID();
  36. echo elgg_view("output/url", array(
  37. "text" => elgg_echo("groups:delete"),
  38. "href" => $delete_url,
  39. "confirm" => elgg_echo("groups:deletewarning"),
  40. "class" => "elgg-button elgg-button-delete float-alt",
  41. ));
  42. }
  43. elgg_pop_context();
  44. ?>
  45. </div>