From 2165e929ddf954f02a589234b2e0faef7ef18df7 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 15 Dec 2010 12:39:32 +0000 Subject: moved friend forms into forms directory git-svn-id: http://code.elgg.org/elgg/trunk@7632 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/forms/friends/collectionfields.php | 15 +++++++ views/default/forms/friends/edit.php | 53 ++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 views/default/forms/friends/collectionfields.php create mode 100644 views/default/forms/friends/edit.php (limited to 'views/default/forms/friends') diff --git a/views/default/forms/friends/collectionfields.php b/views/default/forms/friends/collectionfields.php new file mode 100644 index 000000000..35db3a962 --- /dev/null +++ b/views/default/forms/friends/collectionfields.php @@ -0,0 +1,15 @@ + + + + +id); + +// Set title, form destination +if (isset($vars['collection'])) { + $action = "friends/editcollection"; + $title = $vars['collection'][0]->name; + $highlight = 'default'; +} else { + $action = "friends/addcollection"; + $title = ""; + $highlight = 'all'; +} + + +$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 .= "

"; + +$form_body .= "

". + elgg_view('friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection', 'highlight' => $highlight)) . "

"; + +$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' => "action/$action")); \ No newline at end of file -- cgit v1.2.3