aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/forms
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-12-23 20:43:48 -0500
committerCash Costello <cash.costello@gmail.com>2011-12-23 20:43:48 -0500
commita9394e1035147e3910b2dc3cf156b0361ea791cc (patch)
treee62e8684b4e5b8f451b27043b00aeced5a9447c0 /mod/groups/views/default/forms
parent2c4e77c49fc43add737daaa76aef710de8d01d30 (diff)
downloadelgg-a9394e1035147e3910b2dc3cf156b0361ea791cc.tar.gz
elgg-a9394e1035147e3910b2dc3cf156b0361ea791cc.tar.bz2
Fixes #2074 adds group search
Diffstat (limited to 'mod/groups/views/default/forms')
-rw-r--r--mod/groups/views/default/forms/groups/find.php16
-rw-r--r--mod/groups/views/default/forms/groups/search.php14
2 files changed, 25 insertions, 5 deletions
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/search.php b/mod/groups/views/default/forms/groups/search.php
index ddf639b74..850b6088e 100644
--- a/mod/groups/views/default/forms/groups/search.php
+++ b/mod/groups/views/default/forms/groups/search.php
@@ -1,16 +1,20 @@
<?php
/**
- * Group tag-based search form body
+ * Group search form
+ *
+ * @uses $vars['entity'] ElggGroup
*/
-$tag_string = elgg_echo('groups:search:tags');
-
$params = array(
- 'name' => 'tag',
+ 'name' => 'q',
'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/hidden', array(
+ 'name' => 'container_guid',
+ 'value' => $vars['entity']->getGUID(),
+));
+
echo elgg_view('input/submit', array('value' => elgg_echo('search:go')));