diff options
Diffstat (limited to 'mod/groups/views/default/forms')
| -rw-r--r-- | mod/groups/views/default/forms/discussion/reply/save.php | 57 | ||||
| -rw-r--r-- | mod/groups/views/default/forms/discussion/save.php | 57 | ||||
| -rw-r--r-- | mod/groups/views/default/forms/forums/addpost.php | 34 | ||||
| -rw-r--r-- | mod/groups/views/default/forms/forums/addtopic.php | 106 | ||||
| -rw-r--r-- | mod/groups/views/default/forms/forums/edittopic.php | 108 | ||||
| -rw-r--r-- | mod/groups/views/default/forms/groups/edit.php | 282 | ||||
| -rw-r--r-- | mod/groups/views/default/forms/groups/find.php | 16 | ||||
| -rw-r--r-- | mod/groups/views/default/forms/groups/invite.php | 48 | ||||
| -rw-r--r-- | mod/groups/views/default/forms/groups/search.php | 20 |
9 files changed, 313 insertions, 415 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/addpost.php b/mod/groups/views/default/forms/forums/addpost.php deleted file mode 100644 index c5236c532..000000000 --- a/mod/groups/views/default/forms/forums/addpost.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - - /** - * Elgg group forum post edit/add page - * - * @package ElggGroups - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider <info@elgg.com> - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - * @uses $vars['entity'] Optionally, the post to edit - */ - -?> -<form action="<?php echo $vars['url']; ?>action/groups/addpost" method="post" class="margin_top"> - <label><?php echo elgg_echo("groups:reply"); ?></label> - <?php - - echo elgg_view("input/longtext",array( - "internalname" => "topic_post", - "value" => $body, - )); - ?> - - - <!-- pass across the topic guid --> - <input type="hidden" name="topic_guid" value="<?php echo $vars['entity']->guid; ?>" /> - <input type="hidden" name="group_guid" value="<?php echo $vars['entity']->container_guid; ?>" /> - - <?php echo elgg_view('input/securitytoken'); ?> - <!-- display the post button --> - <input type="submit" class="submit_button" value="<?php echo elgg_echo('post'); ?>" /> -</form> 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 fcc75f7a7..000000000 --- a/mod/groups/views/default/forms/forums/addtopic.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php -/** - * Elgg Groups topic edit/add page - * - * @package ElggGroups - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider <info@elgg.com> - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - * @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 = ""; - $access_id = ACCESS_DEFAULT; - - // get the group guid - $group_guid = (int) get_input('group_guid'); - - // set up breadcrumbs - $group = get_entity($group_guid); - elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/"); - elgg_push_breadcrumb($group->name, $group->getURL()); - elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), $CONFIG->wwwroot."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 action="<?php echo $vars['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)); ?> - </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 89c8c441b..000000000 --- a/mod/groups/views/default/forms/forums/edittopic.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - - /** - * Elgg Groups topic edit/add page - * - * @package ElggGroups - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider <info@elgg.com> - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - * @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']->getAnnotations('group_topic_post', 1, 0, "asc"); - - foreach($message as $mes){ - $messsage_content = $mes->value; - $message_id = $mes->id; - } - - // 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 action="<?php echo $vars['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" => $messsage_content, - )); - ?> - </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="sticky" <?php if($status == "sticky") echo "SELECTED";?>><?php echo elgg_echo('groups:topicsticky'); ?></option> - <option value="resolved" <?php if($status == "resolved") echo "SELECTED";?>><?php echo elgg_echo('groups:topicresolved'); ?></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> diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php index c0c9591f3..e2dc5455a 100644 --- a/mod/groups/views/default/forms/groups/edit.php +++ b/mod/groups/views/default/forms/groups/edit.php @@ -1,164 +1,178 @@ <?php - /** - * Elgg groups plugin - * - * @package ElggGroups - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - - // new groups default to open membership - if (isset($vars['entity'])) { - $membership = $vars['entity']->membership; - } else { - $membership = ACCESS_PUBLIC; - } - -?> -<form action="<?php echo $vars['url']; ?>action/groups/edit" 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"), 1 => elgg_echo("LOGGED_IN"), 2 => elgg_echo("PUBLIC")); - $collections = get_user_access_collections($this_owner); - if (is_array($collections)) - { - foreach ($collections as $c) - $access[$c->id] = $c->name; - } - - echo elgg_view('input/access', array('internalname' => 'vis', 'value' => ($vars['entity']->access_id ? $vars['entity']->access_id : ACCESS_PUBLIC), '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>'; } ?> - <p> - <?php - if ($vars['entity']) { - ?><input type="hidden" name="group_guid" value="<?php echo $vars['entity']->getGUID(); ?>" /><?php - } - ?> - <input type="hidden" name="user_guid" value="<?php echo page_owner_entity()->guid; ?>" /> - <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 $vars['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 07fe7ad97..ef3131782 100644 --- a/mod/groups/views/default/forms/groups/invite.php +++ b/mod/groups/views/default/forms/groups/invite.php @@ -1,40 +1,22 @@ <?php - /** - * Elgg groups plugin - * - * @package ElggGroups - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ +/** + * Elgg groups invite form + * + * @package ElggGroups + */ - $group = $vars['entity']; - $owner = get_entity($vars['entity']->owner_guid); - $forward_url = $group->getURL(); +$group = $vars['entity']; +$owner = $group->getOwnerEntity(); +$forward_url = $group->getURL(); +$friends = elgg_get_logged_in_user_entity()->getFriends('', 0); - $friends = elgg_get_entities_from_relationship($options); - $options = array( - 'relationship' => 'friend', - 'relationship_guid' => get_loggedin_user()->guid, - 'type' => 'user', - 'limit' => 9999 - ); if ($friends) { -?> -<form action="<?php echo $vars['url']; ?>action/groups/invite" method="post" 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'))); |
