diff options
author | kevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-09 11:21:44 +0000 |
---|---|---|
committer | kevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-09 11:21:44 +0000 |
commit | b32b99e3f464d23de30e5c199ae33ba1819b6fbd (patch) | |
tree | 554dbc0c43533deecc9963eb11e8e021e500813b /mod/groups/views/default | |
parent | 640444e38d4e3a6c88b182464071944627b4e11e (diff) | |
download | elgg-b32b99e3f464d23de30e5c199ae33ba1819b6fbd.tar.gz elgg-b32b99e3f464d23de30e5c199ae33ba1819b6fbd.tar.bz2 |
Groups now support add_group_tool_option so that any group tool can be toggled on or off via the group's edit form.
git-svn-id: https://code.elgg.org/elgg/trunk@3131 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r-- | mod/groups/views/default/forms/groups/edit.php | 52 |
1 files changed, 17 insertions, 35 deletions
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php index 6b5f7b02d..82dd3d71f 100644 --- a/mod/groups/views/default/forms/groups/edit.php +++ b/mod/groups/views/default/forms/groups/edit.php @@ -54,46 +54,24 @@ </p>
+ <?php
+ if (isset($vars['config']->group_tool_options)) {
+ foreach($vars['config']->group_tool_options as $group_option) {
+ $group_option_toggle_name = $group_option->name."_enable";
+ if ($group_option->default_on) {
+ $group_option_default_value = 'yes';
+ } else {
+ $group_option_default_value = 'no';
+ }
+?>
<p>
<label>
- <?php echo elgg_echo('groups:enablepages'); ?><br />
+ <?php echo $group_option->label; ?><br />
<?php
echo elgg_view("input/radio",array(
- "internalname" => "pages_enable",
- "value" => $vars['entity']->pages_enable ? $vars['entity']->pages_enable : 'yes',
- 'options' => array(
- elgg_echo('groups:yes') => 'yes',
- elgg_echo('groups:no') => 'no',
- ),
- ));
- ?>
- </label>
- </p>
- <p>
- <label>
- <?php echo elgg_echo('groups:enableforum'); ?><br />
- <?php
-
- echo elgg_view("input/radio",array(
- "internalname" => "forum_enable",
- "value" => $vars['entity']->forum_enable ? $vars['entity']->forum_enable : 'yes',
- 'options' => array(
- elgg_echo('groups:yes') => 'yes',
- elgg_echo('groups:no') => 'no',
- ),
- ));
- ?>
- </label>
- </p>
- <p>
- <label>
- <?php echo elgg_echo('groups:enablefiles'); ?><br />
- <?php
-
- echo elgg_view("input/radio",array(
- "internalname" => "files_enable",
- "value" => $vars['entity']->files_enable ? $vars['entity']->files_enable : 'yes',
+ "internalname" => $group_option_toggle_name,
+ "value" => $vars['entity']->$group_option_toggle_name ? $vars['entity']->$group_option_toggle_name : $group_option_default_value,
'options' => array(
elgg_echo('groups:yes') => 'yes',
elgg_echo('groups:no') => 'no',
@@ -102,6 +80,10 @@ ?>
</label>
</p>
+ <?php
+ }
+ }
+ ?>
<p>
<?php
if ($vars['entity'])
|