diff options
author | cash <cash.costello@gmail.com> | 2011-10-13 21:31:27 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-10-13 21:31:27 -0400 |
commit | c6a14d6c6a04eeee2c126ea20ec0e9ee23489ef3 (patch) | |
tree | 6808e6674d64e7b0997271c347bd605a81e4b843 /views/default/input/userpicker.php | |
parent | 7e23a3bd6382190084f136ed5aeb6b910ae00eee (diff) | |
download | elgg-c6a14d6c6a04eeee2c126ea20ec0e9ee23489ef3.tar.gz elgg-c6a14d6c6a04eeee2c126ea20ec0e9ee23489ef3.tar.bz2 |
displaying users that have been selected and added remove capability
Diffstat (limited to 'views/default/input/userpicker.php')
-rw-r--r-- | views/default/input/userpicker.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php index 94129d1e0..87cc6e24a 100644 --- a/views/default/input/userpicker.php +++ b/views/default/input/userpicker.php @@ -24,18 +24,17 @@ elgg_load_js('elgg.userpicker'); function user_picker_add_user($user_id) { $user = get_entity($user_id); if (!$user || !($user instanceof ElggUser)) { - return FALSE; + return false; } - $icon = $user->getIconURL('tiny'); - - $code = '<li class="elgg-image-block">'; - $code .= "<div class='elgg-image'><img class=\"livesearch_icon\" src=\"$icon\" /></div>"; - $code .= "<div class='elgg-image-alt'><a onclick='elgg.userpicker.removeUser(this, $user_id)'><strong>X</strong></a></div>"; - $code .= "<div class='elgg-body'>"; - $code .= "$user->name - $user->username"; - $code .= "<input type=\"hidden\" name=\"members[]\" value=\"$user_id\">"; + $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => false)); + + $code = '<li><div class="elgg-image-block">'; + $code .= "<div class='elgg-image'>$icon</div>"; + $code .= "<div class='elgg-image-alt'><a href='#' class='elgg-userpicker-remove'>X</a></div>"; + $code .= "<div class='elgg-body'>" . $user->name . "</div>"; $code .= "</div>"; + $code .= "<input type=\"hidden\" name=\"members[]\" value=\"$user_id\">"; $code .= '</li>'; return $code; @@ -64,7 +63,7 @@ foreach ($vars['value'] as $user_id) { <input type="text" class="elgg-input-user-picker" size="30"/> <input type="checkbox" name="match_on" value="true" /> <label><?php echo elgg_echo('userpicker:only_friends'); ?></label> - <ul class="elgg-user-picker-entries"><?php echo $user_list; ?></ul> + <ul class="elgg-user-picker-list"><?php echo $user_list; ?></ul> </div> <script type="text/javascript"> elgg.userpicker.userList = <?php echo $json_values ?>; |