aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/groups/views/default/forms/groups/delete.php17
-rw-r--r--mod/groups/views/default/forms/groups/edit.php2
-rw-r--r--mod/groups/views/default/groups/edit.php17
3 files changed, 21 insertions, 15 deletions
diff --git a/mod/groups/views/default/forms/groups/delete.php b/mod/groups/views/default/forms/groups/delete.php
new file mode 100644
index 000000000..67a4bcd85
--- /dev/null
+++ b/mod/groups/views/default/forms/groups/delete.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Group delete form body
+ */
+
+$warning = elgg_echo("groups:deletewarning");
+
+echo elgg_view('input/hidden', array(
+ 'internalname' => 'group_guid',
+ 'value' => $vars['entity']->getGUID(),
+));
+
+echo elgg_view('input/submit', array(
+ 'class' => "elgg-button-cancel",
+ 'value' => elgg_echo('groups:delete'),
+ 'onclick' => "javascript:return confirm('$warning')",
+));
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php
index 13d42998a..d4a2754ca 100644
--- a/mod/groups/views/default/forms/groups/edit.php
+++ b/mod/groups/views/default/forms/groups/edit.php
@@ -113,6 +113,7 @@ if ($tools) {
<div>
<label>
<?php echo $group_option->label; ?><br />
+ </label>
<?php echo elgg_view("input/radio", array(
"internalname" => $group_option_toggle_name,
"value" => $value,
@@ -122,7 +123,6 @@ if ($tools) {
),
));
?>
- </label>
</div>
<?php
}
diff --git a/mod/groups/views/default/groups/edit.php b/mod/groups/views/default/groups/edit.php
index 9b7eeeaa2..0634f3ac5 100644
--- a/mod/groups/views/default/groups/edit.php
+++ b/mod/groups/views/default/groups/edit.php
@@ -10,18 +10,7 @@ $body_vars = array('entity' => $entity);
echo elgg_view_form('groups/edit', $form_vars, $body_vars);
if ($entity) {
-?>
-<div class="delete_group">
- <form action="<?php echo elgg_get_site_url() . "action/groups/delete"; ?>">
- <?php
- echo elgg_view('input/securitytoken');
- $warning = elgg_echo("groups:deletewarning");
- ?>
- <input type="hidden" name="group_guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
- <input type="submit" class="elgg-button-action elgg-state-disabled" name="delete" value="<?php echo elgg_echo('groups:delete'); ?>" onclick="javascript:return confirm('<?php echo $warning; ?>')"/><?php
- ?>
- </form>
-</div>
-<?php
+ echo '<div class="delete_group">';
+ echo elgg_view_form('groups/delete', array(), array('entity' => $entity));
+ echo '</div>';
}
-?>