diff options
-rw-r--r-- | actions/friends/addcollection.php | 3 | ||||
-rw-r--r-- | views/default/friends/forms/edit.php | 38 |
2 files changed, 37 insertions, 4 deletions
diff --git a/actions/friends/addcollection.php b/actions/friends/addcollection.php index 64ee89fe8..5eb539445 100644 --- a/actions/friends/addcollection.php +++ b/actions/friends/addcollection.php @@ -12,7 +12,8 @@ */
//must be logged in
- gatekeeper();
+ gatekeeper(); + action_gatekeeper();
$collection_name = get_input('collection_name');
$friends = get_input('friends_collection');
diff --git a/views/default/friends/forms/edit.php b/views/default/friends/forms/edit.php index 7c8a3f455..e4065e67e 100644 --- a/views/default/friends/forms/edit.php +++ b/views/default/friends/forms/edit.php @@ -23,10 +23,42 @@ $action = "friends/addcollection";
$title = "";
}
-
+ + + $form_body = "<p><label>" . elgg_echo("friends:collectionname") . "<br />" . + elgg_view("input/text", array( + "internalname" => "collection_name", + "value" => $title, + )) . "</label></p>"; + + $form_body .= "<p>"; + + if($vars['collection_members']){ + $form_body .= elgg_echo("friends:collectionfriends") . "<br />"; + foreach($vars['collection_members'] as $mem){ + + $form_body .= elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny')); + $form_body .= $mem->name; + + } + } + + $form_body .= "</p>"; + + $form_body .= "<p><label>" . elgg_echo("friends:addfriends") . "<br />". + elgg_view('friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection')) . "</label></p>"; + + $form_body .= "<p>"; + 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 .= "</p>"; + + echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/$action"));
?>
- <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
+<!-- <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
<p>
<label><?php echo elgg_echo("friends:collectionname"); ?><br />
<?php
@@ -73,4 +105,4 @@ <input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" />
</p>
- </form>
\ No newline at end of file + </form> -->
\ No newline at end of file |