aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/forms
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views/default/forms')
-rw-r--r--mod/groups/views/default/forms/discussion/reply/save.php57
-rw-r--r--mod/groups/views/default/forms/discussion/save.php57
-rw-r--r--mod/groups/views/default/forms/forums/addtopic.php103
-rw-r--r--mod/groups/views/default/forms/forums/edittopic.php96
-rw-r--r--mod/groups/views/default/forms/groups/edit.php285
-rw-r--r--mod/groups/views/default/forms/groups/find.php16
-rw-r--r--mod/groups/views/default/forms/groups/invite.php37
-rw-r--r--mod/groups/views/default/forms/groups/search.php20
8 files changed, 313 insertions, 358 deletions
diff --git a/mod/groups/views/default/forms/discussion/reply/save.php b/mod/groups/views/default/forms/discussion/reply/save.php
new file mode 100644
index 000000000..083fefb78
--- /dev/null
+++ b/mod/groups/views/default/forms/discussion/reply/save.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Discussion topic reply form body
+ *
+ * @uses $vars['entity'] A discussion topic object
+ * @uses $vars['inline'] Display a shortened form?
+ */
+
+if (isset($vars['entity']) && elgg_is_logged_in()) {
+ echo elgg_view('input/hidden', array(
+ 'name' => 'entity_guid',
+ 'value' => $vars['entity']->getGUID(),
+ ));
+
+ $inline = elgg_extract('inline', $vars, false);
+
+ $annotation = elgg_extract('annotation', $vars);
+
+ $value = '';
+
+ if ($annotation) {
+ $value = $annotation->value;
+ echo elgg_view('input/hidden', array(
+ 'name' => 'annotation_id',
+ 'value' => $annotation->id
+ ));
+ }
+
+ if ($inline) {
+ echo elgg_view('input/text', array('name' => 'group_topic_post', 'value' => $value));
+ echo elgg_view('input/submit', array('value' => elgg_echo('reply')));
+ } else {
+?>
+ <div>
+ <label>
+ <?php
+ if ($annotation) {
+ echo elgg_echo('edit');
+ } else {
+ echo elgg_echo("reply");
+ }
+ ?>
+ </label>
+ <?php echo elgg_view('input/longtext', array('name' => 'group_topic_post', 'value' => $value)); ?>
+ </div>
+ <div class="elgg-foot">
+<?php
+ if ($annotation) {
+ echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+ } else {
+ echo elgg_view('input/submit', array('value' => elgg_echo('reply')));
+ }
+?>
+ </div>
+<?php
+ }
+}
diff --git a/mod/groups/views/default/forms/discussion/save.php b/mod/groups/views/default/forms/discussion/save.php
new file mode 100644
index 000000000..a6582ede7
--- /dev/null
+++ b/mod/groups/views/default/forms/discussion/save.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Discussion topic add/edit form body
+ *
+ */
+
+$title = elgg_extract('title', $vars, '');
+$desc = elgg_extract('description', $vars, '');
+$status = elgg_extract('status', $vars, '');
+$tags = elgg_extract('tags', $vars, '');
+$access_id = elgg_extract('access_id', $vars, ACCESS_DEFAULT);
+$container_guid = elgg_extract('container_guid', $vars);
+$guid = elgg_extract('guid', $vars, null);
+
+?>
+<div>
+ <label><?php echo elgg_echo('title'); ?></label><br />
+ <?php echo elgg_view('input/text', array('name' => 'title', 'value' => $title)); ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('groups:topicmessage'); ?></label>
+ <?php echo elgg_view('input/longtext', array('name' => 'description', 'value' => $desc)); ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('tags'); ?></label>
+ <?php echo elgg_view('input/tags', array('name' => 'tags', 'value' => $tags)); ?>
+</div>
+<div>
+ <label><?php echo elgg_echo("groups:topicstatus"); ?></label><br />
+ <?php
+ echo elgg_view('input/dropdown', array(
+ 'name' => 'status',
+ 'value' => $status,
+ 'options_values' => array(
+ 'open' => elgg_echo('groups:topicopen'),
+ 'closed' => elgg_echo('groups:topicclosed'),
+ ),
+ ));
+ ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('access'); ?></label><br />
+ <?php echo elgg_view('input/access', array('name' => 'access_id', 'value' => $access_id)); ?>
+</div>
+<div class="elgg-foot">
+<?php
+
+echo elgg_view('input/hidden', array('name' => 'container_guid', 'value' => $container_guid));
+
+if ($guid) {
+ echo elgg_view('input/hidden', array('name' => 'topic_guid', 'value' => $guid));
+}
+
+echo elgg_view('input/submit', array('value' => elgg_echo("save")));
+
+?>
+</div>
diff --git a/mod/groups/views/default/forms/forums/addtopic.php b/mod/groups/views/default/forms/forums/addtopic.php
deleted file mode 100644
index 7d61e2514..000000000
--- a/mod/groups/views/default/forms/forums/addtopic.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-/**
- * Elgg Groups topic edit/add page
- *
- * @package ElggGroups
- *
- * @uses $vars['object'] Optionally, the topic to edit
- */
-
- // Set title, form destination
- $title = elgg_echo("groups:addtopic");
- $action = "groups/addtopic";
- $tags = "";
- $title = "";
- $message = "";
- $message_id = "";
- $status = "";
-
- // get the group guid
- $group_guid = (int) get_input('group_guid');
-
- // set up breadcrumbs
- $group = get_entity($group_guid);
- $access_id = $group->group_acl;
- $options = group_access_options($group);
- elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/");
- elgg_push_breadcrumb($group->name, $group->getURL());
- elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), elgg_get_site_url()."pg/groups/forum/{$group_guid}/");
- elgg_push_breadcrumb(elgg_echo("groups:addtopic"));
-
- echo elgg_view('navigation/breadcrumbs');
-
- // set the title
- echo elgg_view_title(elgg_echo("groups:addtopic"));
-
-?>
-<!-- display the input form -->
-<form id="group_addtopic" action="<?php echo elgg_get_site_url(); ?>action/<?php echo $action; ?>" method="post" class="margin-top">
-<?php echo elgg_view('input/securitytoken'); ?>
-
- <p>
- <label><?php echo elgg_echo("title"); ?><br />
- <?php
- //display the topic title input
- echo elgg_view("input/text", array(
- "internalname" => "topictitle",
- "value" => $title,
- ));
- ?>
- </label>
- </p>
-
- <!-- display the tag input -->
- <p>
- <label><?php echo elgg_echo("tags"); ?><br />
- <?php
-
- echo elgg_view("input/tags", array(
- "internalname" => "topictags",
- "value" => $tags,
- ));
-
- ?>
- </label>
- </p>
-
- <!-- topic message input -->
- <p class="longtext_inputarea">
- <label><?php echo elgg_echo("groups:topicmessage"); ?></label>
- <?php
-
- echo elgg_view("input/longtext",array(
- "internalname" => "topicmessage",
- "value" => $message,
- ));
- ?>
- </p>
-
- <!-- set the topic status -->
- <p>
- <label><?php echo elgg_echo("groups:topicstatus"); ?><br />
- <select name="status">
- <option value="open" <?php if($status == "") echo "SELECTED";?>><?php echo elgg_echo('groups:topicopen'); ?></option>
- <option value="closed" <?php if($status == "closed") echo "SELECTED";?>><?php echo elgg_echo('groups:topicclosed'); ?></option>
- </select>
- </label>
- </p>
-
- <!-- access -->
- <p>
- <label>
- <?php echo elgg_echo('access'); ?><br />
- <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id, 'options' => $options)); ?>
- </label>
- </p>
-
- <!-- required hidden info and submit button -->
- <p>
- <input type="hidden" name="group_guid" value="<?php echo $group_guid; ?>" />
- <input type="submit" class="submit-button" value="<?php echo elgg_echo('post'); ?>" />
- </p>
-
-</form>
diff --git a/mod/groups/views/default/forms/forums/edittopic.php b/mod/groups/views/default/forms/forums/edittopic.php
deleted file mode 100644
index 6321a9536..000000000
--- a/mod/groups/views/default/forms/forums/edittopic.php
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-
- /**
- * Elgg Groups topic edit/add page
- *
- * @package ElggGroups
- *
- * @uses $vars['entity'] Optionally, the topic to edit
- */
-
- //users can edit the access and status for now
- $access_id = $vars['entity']->access_id;
- $status = $vars['entity']->status;
- $tags = $vars['entity']->tags;
- $title = $vars['entity']->title;
- $message = $vars['entity']->description;
-
- // get the group GUID
- $group_guid = get_input("group");
-
- // topic guid
- $topic_guid = $vars['entity']->guid;
-
- // set the title
- echo elgg_view_title(elgg_echo("groups:edittopic"));
-
-?>
-<!-- display the input form -->
- <form id="group_edittopic" action="<?php echo elgg_get_site_url(); ?>action/groups/edittopic" method="post">
- <?php echo elgg_view('input/securitytoken'); ?>
-
- <p>
- <label><?php echo elgg_echo("title"); ?><br />
- <?php
- //display the topic title input
- echo elgg_view("input/text", array(
- "internalname" => "topictitle",
- "value" => $title,
- ));
- ?>
- </label>
- </p>
-
- <!-- display the tag input -->
- <p>
- <label><?php echo elgg_echo("tags"); ?><br />
- <?php
-
- echo elgg_view("input/tags", array(
- "internalname" => "topictags",
- "value" => $tags,
- ));
-
- ?>
- </label>
- </p>
-
- <!-- topic message input -->
- <p class="longtext_inputarea">
- <label><?php echo elgg_echo("groups:topicmessage"); ?></label>
- <?php
-
- echo elgg_view("input/longtext",array(
- "internalname" => "topicmessage",
- "value" => html_entity_decode($message, ENT_COMPAT, 'UTF-8')
- ));
- ?>
- </p>
-
- <!-- set the topic status -->
- <p>
- <label><?php echo elgg_echo("groups:topicstatus"); ?><br />
- <select name="status">
- <option value="open" <?php if($status == "") echo "SELECTED";?>><?php echo elgg_echo('groups:topicopen'); ?></option>
- <option value="closed" <?php if($status == "closed") echo "SELECTED";?>><?php echo elgg_echo('groups:topicclosed'); ?></option>
- </select>
- </label>
- </p>
-
- <!-- access -->
- <p>
- <label>
- <?php echo elgg_echo('access'); ?><br />
- <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
- </label>
- </p>
-
- <!-- required hidden info and submit button -->
- <p>
- <input type="hidden" name="group_guid" value="<?php echo $group_guid; ?>" />
- <input type="hidden" name="topic" value="<?php echo $topic_guid; ?>" />
- <input type="hidden" name="message_id" value="<?php echo $message_id; ?>" />
- <input type="submit" class="submit-button" value="<?php echo elgg_echo('save'); ?>" />
- </p>
-
- </form> \ No newline at end of file
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php
index d3eb7ac68..e2dc5455a 100644
--- a/mod/groups/views/default/forms/groups/edit.php
+++ b/mod/groups/views/default/forms/groups/edit.php
@@ -1,167 +1,178 @@
<?php
- /**
- * Elgg groups plugin
- *
- * @package ElggGroups
- */
-
- // new groups default to open membership
- if (isset($vars['entity'])) {
- $membership = $vars['entity']->membership;
- } else {
- $membership = ACCESS_PUBLIC;
- }
-
-?>
-<form action="<?php echo elgg_get_site_url(); ?>action/groups/edit" id="edit_group" enctype="multipart/form-data" method="post" class="margin-top">
+/**
+ * Group edit form
+ *
+ * @package ElggGroups
+ */
- <?php echo elgg_view('input/securitytoken'); ?>
-
- <p>
- <label><?php echo elgg_echo("groups:icon"); ?><br />
- <?php
-
- echo elgg_view("input/file",array('internalname' => 'icon'));
-
- ?>
- </label>
- </p>
-<?php
+// only extract these elements.
+$name = $membership = $vis = $entity = null;
+extract($vars, EXTR_IF_EXISTS);
-//var_export($vars['profile']);
-if (is_array($vars['config']->group) && sizeof($vars['config']->group) > 0)
- foreach($vars['config']->group as $shortname => $valtype) {
- if ($shortname == 'description') {
-?>
- <p><label>
- <?php echo elgg_echo("groups:{$shortname}") ?></label>
- <?php echo elgg_view("input/{$valtype}",array(
- 'internalname' => $shortname,
- 'value' => $vars['entity']->$shortname,
- )); ?>
- </p>
-<?php
- } else {
?>
- <p><label>
- <?php echo elgg_echo("groups:{$shortname}") ?><br />
- <?php echo elgg_view("input/{$valtype}",array(
- 'internalname' => $shortname,
- 'value' => $vars['entity']->$shortname,
- )); ?>
- </label></p>
+<div>
+ <label><?php echo elgg_echo("groups:icon"); ?></label><br />
+ <?php echo elgg_view("input/file", array('name' => 'icon')); ?>
+</div>
+<div>
+ <label><?php echo elgg_echo("groups:name"); ?></label><br />
+ <?php echo elgg_view("input/text", array(
+ 'name' => 'name',
+ 'value' => $name
+ ));
+ ?>
+</div>
<?php
+
+$group_profile_fields = elgg_get_config('group');
+if ($group_profile_fields > 0) {
+ foreach ($group_profile_fields as $shortname => $valtype) {
+ $line_break = '<br />';
+ if ($valtype == 'longtext') {
+ $line_break = '';
+ }
+ echo '<div><label>';
+ echo elgg_echo("groups:{$shortname}");
+ echo "</label>$line_break";
+ echo elgg_view("input/{$valtype}", array(
+ 'name' => $shortname,
+ 'value' => elgg_extract($shortname, $vars)
+ ));
+ echo '</div>';
}
}
?>
- <p>
- <label>
- <?php echo elgg_echo('groups:membership'); ?><br />
- <?php echo elgg_view('input/access', array('internalname' => 'membership','value' => $membership, 'options' => array( ACCESS_PRIVATE => elgg_echo('groups:access:private'), ACCESS_PUBLIC => elgg_echo('groups:access:public')))); ?>
- </label>
- </p>
+<div>
+ <label>
+ <?php echo elgg_echo('groups:membership'); ?><br />
+ <?php echo elgg_view('input/dropdown', array(
+ 'name' => 'membership',
+ 'value' => $membership,
+ 'options_values' => array(
+ ACCESS_PRIVATE => elgg_echo('groups:access:private'),
+ ACCESS_PUBLIC => elgg_echo('groups:access:public')
+ )
+ ));
+ ?>
+ </label>
+</div>
- <?php
+<?php
- if (get_plugin_setting('hidden_groups', 'groups') == 'yes')
- {
+if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') {
+ $access_options = array(
+ ACCESS_PRIVATE => elgg_echo('groups:access:group'),
+ ACCESS_LOGGED_IN => elgg_echo("LOGGED_IN"),
+ ACCESS_PUBLIC => elgg_echo("PUBLIC")
+ );
?>
- <p>
- <label>
+<div>
+ <label>
<?php echo elgg_echo('groups:visibility'); ?><br />
- <?php
-
- $this_owner = $vars['entity']->owner_guid;
- if (!$this_owner) {
- $this_owner = get_loggedin_userid();
- }
-
- $access = array(ACCESS_FRIENDS => elgg_echo("access:friends:label"), ACCESS_LOGGED_IN => elgg_echo("LOGGED_IN"), ACCESS_PUBLIC => elgg_echo("PUBLIC"));
- $collections = get_user_access_collections($vars['entity']->guid);
- if (is_array($collections)) {
- foreach ($collections as $c)
- $access[$c->id] = $c->name;
- }
-
- $current_access = ($vars['entity']->access_id ? $vars['entity']->access_id : ACCESS_PUBLIC);
- echo elgg_view('input/access', array('internalname' => 'vis',
- 'value' => $current_access,
- 'options' => $access));
-
-
+ <?php echo elgg_view('input/access', array(
+ 'name' => 'vis',
+ 'value' => $vis,
+ 'options_values' => $access_options,
+ ));
?>
- </label>
- </p>
+ </label>
+</div>
<?php
+}
+
+if (isset($vars['entity'])) {
+ $entity = $vars['entity'];
+ $owner_guid = $vars['entity']->owner_guid;
+} else {
+ $entity = false;
+}
+
+if ($entity && ($owner_guid == elgg_get_logged_in_user_guid() || elgg_is_admin_logged_in())) {
+ $members = array();
+
+ $options = array(
+ 'relationship' => 'member',
+ 'relationship_guid' => $vars['entity']->getGUID(),
+ 'inverse_relationship' => true,
+ 'type' => 'user',
+ 'limit' => 0,
+ );
+
+ $batch = new ElggBatch('elgg_get_entities_from_relationship', $options);
+ foreach ($batch as $member) {
+ $members[$member->guid] = "$member->name (@$member->username)";
}
-
- ?>
-
- <?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 $group_option->label; ?><br />
- <?php
-
- echo elgg_view("input/radio",array(
- "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',
- ),
- ));
- ?>
- </label>
- </p>
+?>
+
+<div>
+ <label>
+ <?php echo elgg_echo('groups:owner'); ?><br />
+ <?php echo elgg_view('input/dropdown', array(
+ 'name' => 'owner_guid',
+ 'value' => $owner_guid,
+ 'options_values' => $members,
+ 'class' => 'groups-owner-input',
+ ));
+ ?>
+ </label>
<?php
- }
+ if ($owner_guid == elgg_get_logged_in_user_guid()) {
+ echo '<span class="elgg-text-help">' . elgg_echo('groups:owner:warning') . '</span>';
}
?>
- <div class="divider"></div>
- <p>
- <?php
- if ($vars['entity'])
- {
- ?>
- <input type="hidden" name="group_guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
- <?php
- }
- ?>
- <input type="submit" class="submit-button" value="<?php echo elgg_echo("save"); ?>" />
-
- </p>
+</div>
-</form>
+<?php
+}
-<?php
-if ($vars['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="action-button disabled" name="delete" value="<?php echo elgg_echo('groups:delete'); ?>" onclick="javascript:return confirm('<?php echo $warning; ?>')"/><?php
+$tools = elgg_get_config('group_tool_options');
+if ($tools) {
+ usort($tools, create_function('$a,$b', 'return strcmp($a->label,$b->label);'));
+ foreach ($tools as $group_option) {
+ $group_option_toggle_name = $group_option->name . "_enable";
+ $value = elgg_extract($group_option_toggle_name, $vars);
+?>
+<div>
+ <label>
+ <?php echo $group_option->label; ?><br />
+ </label>
+ <?php echo elgg_view("input/radio", array(
+ "name" => $group_option_toggle_name,
+ "value" => $value,
+ 'options' => array(
+ elgg_echo('groups:yes') => 'yes',
+ elgg_echo('groups:no') => 'no',
+ ),
+ ));
?>
- </form>
</div>
<?php
+ }
}
?>
+<div class="elgg-foot">
+<?php
+
+if ($entity) {
+ echo elgg_view('input/hidden', array(
+ 'name' => 'group_guid',
+ 'value' => $entity->getGUID(),
+ ));
+}
+echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+if ($entity) {
+ $delete_url = 'action/groups/delete?guid=' . $entity->getGUID();
+ echo elgg_view('output/confirmlink', array(
+ 'text' => elgg_echo('groups:delete'),
+ 'href' => $delete_url,
+ 'confirm' => elgg_echo('groups:deletewarning'),
+ 'class' => 'elgg-button elgg-button-delete float-alt',
+ ));
+}
+?>
+</div>
diff --git a/mod/groups/views/default/forms/groups/find.php b/mod/groups/views/default/forms/groups/find.php
new file mode 100644
index 000000000..ddf639b74
--- /dev/null
+++ b/mod/groups/views/default/forms/groups/find.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Group tag-based search form body
+ */
+
+$tag_string = elgg_echo('groups:search:tags');
+
+$params = array(
+ 'name' => 'tag',
+ 'class' => 'elgg-input-search mbm',
+ 'value' => $tag_string,
+ 'onclick' => "if (this.value=='$tag_string') { this.value='' }",
+);
+echo elgg_view('input/text', $params);
+
+echo elgg_view('input/submit', array('value' => elgg_echo('search:go')));
diff --git a/mod/groups/views/default/forms/groups/invite.php b/mod/groups/views/default/forms/groups/invite.php
index 279e11a20..ef3131782 100644
--- a/mod/groups/views/default/forms/groups/invite.php
+++ b/mod/groups/views/default/forms/groups/invite.php
@@ -1,29 +1,22 @@
<?php
- /**
- * Elgg groups plugin
- *
- * @package ElggGroups
- */
+/**
+ * Elgg groups invite form
+ *
+ * @package ElggGroups
+ */
- $group = $vars['entity'];
- $owner = get_entity($vars['entity']->owner_guid);
- $forward_url = $group->getURL();
- $friends = get_loggedin_user()->getFriends('', 0);
+$group = $vars['entity'];
+$owner = $group->getOwnerEntity();
+$forward_url = $group->getURL();
+$friends = elgg_get_logged_in_user_entity()->getFriends('', 0);
if ($friends) {
-?>
-<form action="<?php echo elgg_get_site_url(); ?>action/groups/invite" method="post" id="invite_to_group" class="margin-top">
-
-<?php
- echo elgg_view('input/securitytoken');
-
- echo elgg_view('friends/picker',array('entities' => $friends, 'internalname' => 'user_guid', 'highlight' => 'all'));
-?>
- <input type="hidden" name="forward_url" value="<?php echo $forward_url; ?>" />
- <input type="hidden" name="group_guid" value="<?php echo $group->guid; ?>" />
- <input type="submit" value="<?php echo elgg_echo('invite'); ?>" />
-</form>
-<?php
+ echo elgg_view('input/friendspicker', array('entities' => $friends, 'name' => 'user_guid', 'highlight' => 'all'));
+ echo '<div class="elgg-foot">';
+ echo elgg_view('input/hidden', array('name' => 'forward_url', 'value' => $forward_url));
+ echo elgg_view('input/hidden', array('name' => 'group_guid', 'value' => $group->guid));
+ echo elgg_view('input/submit', array('value' => elgg_echo('invite')));
+ echo '</div>';
} else {
echo elgg_echo('groups:nofriendsatall');
} \ No newline at end of file
diff --git a/mod/groups/views/default/forms/groups/search.php b/mod/groups/views/default/forms/groups/search.php
new file mode 100644
index 000000000..850b6088e
--- /dev/null
+++ b/mod/groups/views/default/forms/groups/search.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Group search form
+ *
+ * @uses $vars['entity'] ElggGroup
+ */
+
+$params = array(
+ 'name' => 'q',
+ 'class' => 'elgg-input-search mbm',
+ 'value' => $tag_string,
+);
+echo elgg_view('input/text', $params);
+
+echo elgg_view('input/hidden', array(
+ 'name' => 'container_guid',
+ 'value' => $vars['entity']->getGUID(),
+));
+
+echo elgg_view('input/submit', array('value' => elgg_echo('search:go')));