id); // Set title, form destination if (isset($vars['collection'])) { $action = "friends/editcollection"; $title = $vars['collection'][0]->name; } else { $action = "friends/addcollection"; $title = ""; } $form_body = "
"; $form_body .= "";
if($vars['collection_members']){
$form_body .= elgg_echo("friends:collectionfriends") . "
";
foreach($vars['collection_members'] as $mem){
$form_body .= elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny'));
$form_body .= $mem->name;
}
}
$form_body .= "
"; if (isset($vars['collection'])) { $form_body .= elgg_view('input/hidden', array('internalname' => 'collection_id', 'value' => "{$vars['collection'][0]->id}")); } $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save'))); $form_body .= "
"; echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/$action")); ?>