diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 16:14:13 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 16:14:13 +0000 |
commit | e65db3fbab88f0bd98c2e5750f09d139837fdc0e (patch) | |
tree | 8fe3f6658db654eaf8d24b9990c81e98555307d7 /mod/groups | |
parent | 2c65422f47c0bb1db7ae7e866b87a4749bc2b6f4 (diff) | |
download | elgg-e65db3fbab88f0bd98c2e5750f09d139837fdc0e.tar.gz elgg-e65db3fbab88f0bd98c2e5750f09d139837fdc0e.tar.bz2 |
pulled delete form out of edit view for groups
git-svn-id: http://code.elgg.org/elgg/trunk@8162 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups')
-rw-r--r-- | mod/groups/views/default/forms/groups/delete.php | 17 | ||||
-rw-r--r-- | mod/groups/views/default/forms/groups/edit.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/edit.php | 17 |
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>'; } -?> |