aboutsummaryrefslogtreecommitdiff
path: root/views/default/input
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-26 20:57:09 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-26 20:57:09 +0000
commita2250e1854f23351b2a39e304e2bd5977f3fd867 (patch)
treec7a846a455073b88ef2db21115baf21fee57b138 /views/default/input
parent657295df1ff884ed9f00b001389978b142ac6ba7 (diff)
downloadelgg-a2250e1854f23351b2a39e304e2bd5977f3fd867.tar.gz
elgg-a2250e1854f23351b2a39e304e2bd5977f3fd867.tar.bz2
Fixes #2982 friends collections work even if the code is convoluted and poorly written.
git-svn-id: http://code.elgg.org/elgg/trunk@8495 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input')
-rw-r--r--views/default/input/friendspicker.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/views/default/input/friendspicker.php b/views/default/input/friendspicker.php
index b95640b0b..82ef3e3d7 100644
--- a/views/default/input/friendspicker.php
+++ b/views/default/input/friendspicker.php
@@ -3,6 +3,8 @@
* Elgg friends picker
* Lists the friends picker
*
+ * @warning Below is the ugliest code in Elgg. It needs to be rewritten or removed
+ *
* @package Elgg
* @subpackage Core
*
@@ -99,7 +101,7 @@ foreach ($users as $letter => $letter_users) {
if (!$callback) {
?>
- <div class="friends-picker">
+ <div class="friends-picker-main-wrapper">
<?php
@@ -118,7 +120,7 @@ if (!isset($vars['replacement'])) {
?>
<?php //@todo JS 1.8: no ?>
<script language="text/javascript">
- $(function() { // onload...do
+ $(function() { // onload...do
$('#collectionMembersForm<?php echo $friendspicker; ?>').submit(function() {
var inputs = [];
$(':input', this).each(function() {
@@ -145,6 +147,11 @@ if (!isset($vars['replacement'])) {
<form id="collectionMembersForm<?php echo $friendspicker; ?>" action="<?php echo $formtarget; ?>" method="post"> <!-- action="" method=""> -->
<?php
+ echo elgg_view('input/securitytoken');
+ echo elgg_view('input/hidden', array(
+ 'name' => 'collection_id',
+ 'value' => $vars['collection_id'],
+ ));
}
?>
@@ -305,7 +312,7 @@ if (!isset($vars['replacement'])) {
// initialise picker
$("div#friends-picker<?php echo $friendspicker; ?>").friendsPicker(<?php echo $friendspicker; ?>);
</script>
-<script>
+<script type="text/javascript">
$(document).ready(function () {
// manually add class to corresponding tab for panels that have content
<?php