aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-07-08 12:21:19 +0200
committerSem <sembrestels@riseup.net>2012-07-08 12:21:19 +0200
commit8c0897d92395d897a8e40a2d1b97e5f838520296 (patch)
tree53f85cefb13bdc377bef6585144a812507c356d6 /mod/groups/views/default
parent7fd67bc8ac6882f1a73aa7f8f907cd6c2a694272 (diff)
downloadelgg-8c0897d92395d897a8e40a2d1b97e5f838520296.tar.gz
elgg-8c0897d92395d897a8e40a2d1b97e5f838520296.tar.bz2
Fixes #1792. Added pluggin setting in groups to set who can create groups, logged in users or only admins.
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r--mod/groups/views/default/plugins/groups/settings.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/mod/groups/views/default/plugins/groups/settings.php b/mod/groups/views/default/plugins/groups/settings.php
index 7197dcb37..41ea146db 100644
--- a/mod/groups/views/default/plugins/groups/settings.php
+++ b/mod/groups/views/default/plugins/groups/settings.php
@@ -8,6 +8,11 @@ if (!isset($vars['entity']->hidden_groups)) {
$vars['entity']->hidden_groups = 'no';
}
+// set default value
+if (!isset($vars['entity']->limited_groups)) {
+ $vars['entity']->limited_groups = 'no';
+}
+
echo '<div>';
echo elgg_echo('groups:allowhiddengroups');
echo ' ';
@@ -20,3 +25,16 @@ echo elgg_view('input/dropdown', array(
'value' => $vars['entity']->hidden_groups,
));
echo '</div>';
+
+echo '<div>';
+echo elgg_echo('groups:whocancreate');
+echo ' ';
+echo elgg_view('input/dropdown', array(
+ 'name' => 'params[limited_groups]',
+ 'options_values' => array(
+ 'no' => elgg_echo('LOGGED_IN'),
+ 'yes' => elgg_echo('admin')
+ ),
+ 'value' => $vars['entity']->limited_groups,
+));
+echo '</div>';