25 if (!isset(
$vars[
'name'])) {
32 if (empty(
$vars[
'highlight'])) {
33 $vars[
'highlight'] =
'default';
35 if (
$vars[
'highlight'] !=
'all') {
36 $vars[
'highlight'] =
'default';
40 if (!isset(
$vars[
'value'])) {
41 $vars[
'value'] = array();
43 if (!is_array(
$vars[
'value'])) {
50 if (isset(
$vars[
'callback'])) {
51 $callback =
$vars[
'callback'];
57 if (!isset(
$vars[
'friendspicker'])) {
59 if (!isset($friendspicker)) {
72 if (isset(
$vars[
'formtarget'])) {
73 $formtarget =
$vars[
'formtarget'];
79 if (is_array(
$vars[
'entities']) &&
sizeof(
$vars[
'entities'])) {
86 if (!isset(
$users[$letter])) {
94 foreach (
$users as $letter => $letter_users) {
95 usort($letter_users,
function($a, $b) {
96 return strcasecmp($a->name, $b->name);
98 $users[$letter] = $letter_users;
104 <
div class=
"friends-picker-main-wrapper">
108 if (isset(
$vars[
'content'])) {
113 <
div id=
"friends-picker_placeholder<?php echo $friendspicker; ?>">
118 if (!isset(
$vars[
'replacement'])) {
125 $(
'#collectionMembersForm<?php echo $friendspicker; ?>').
submit(
function() {
127 $(
':input',
this).each(
function() {
128 if (this.
type !=
'checkbox' || (this.
type ==
'checkbox' && this.checked !=
false)) {
129 inputs.push(this.
name +
'=' + escape(this.value));
134 data: inputs.join(
'&'),
137 $(
'a.collectionmembers<?php echo $friendspicker; ?>').
click();
147 <!-- Collection members
form -->
148 <
form id=
"collectionMembersForm<?php echo $friendspicker; ?>" action=
"<?php echo $formtarget; ?>" method=
"post"> <!--
action=
"" method=
""> -->
153 'name' =>
'collection_id',
154 'value' =>
$vars[
'collection_id'],
159 <
div class=
"friends-picker-wrapper">
160 <
div id=
"friends-picker<?php echo $friendspicker; ?>">
161 <
div class=
"friends-picker-container">
170 <
div class=
"panel" title=
"<?php echo $letter; ?>">
171 <
div class=
"wrapper">
175 if (isset(
$users[$letter])) {
178 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
195 if (in_array($friend->getGUID(),
$vars[
'value'])) {
196 $checked =
"checked = \"checked\"";
207 <
input type=
"checkbox" <?php
echo $checked; ?>
name=
"<?php echo $name; ?>[]" value=
"<?php echo $options[$label]; ?>" />
213 <
div style=
"width: 25px; margin-bottom: 15px;">
219 <
td style=
"width: 200px; padding: 5px;">
220 <?php
echo $friend->name; ?>
243 if ($letter == $substr) {
258 if (isset(
$vars[
'formcontents']))
262 <
div class=
"clearfix"></
div>
263 <
div class=
"friendspicker-savebuttons">
264 <
input type=
"submit" class=
"elgg-button elgg-button-submit" value=
"<?php echo elgg_echo('save'); ?>" />
265 <
input type=
"button" class=
"elgg-button elgg-button-cancel" value=
"<?php echo elgg_echo('cancel'); ?>" onclick=
"$('a.collectionmembers<?php echo $friendspicker; ?>').click();" />
300 require([
'jquery'],
function($) {
312 $(
"div#friends-picker-navigation<?php echo $friendspicker; ?> li.tab<?php echo $tab; ?> a").addClass(
"tabHasContent");
elgg_strtoupper()
Wrapper function for mb_strtoupper().
if($guid==elgg_get_logged_in_user_guid()) $name
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_strlen()
Wrapper function for mb_strlen().
elgg_strpos()
Wrapper function for mb_strpos().
elgg echo
Translates a string.
elgg require
Throw an error if the required package isn't present.
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
elgg global
Pointer to the global context.
function elgg combo checkbox click(function(){if($(this).is(':checked')){$(this).prev().attr('disabled', true);$(this).prev().val('');}else{$(this).prev().attr('disabled', false);}})
elgg_substr()
Wrapper function for mb_substr().
elgg message elgg state success
$label
Elgg profile plugin edit default profile action.
elgg_load_js($name)
Load a JavaScript resource on this page.
if(!$site) if(!($site instanceof ElggSite)) $site url
elgg_view_entity_icon(\ElggEntity $entity, $size= 'medium', $vars=array())
View the icon of an entity.
elgg_substr_count()
Wrapper function for mb_substr_count().
elgg table input[type=checkbox]