aboutsummaryrefslogtreecommitdiff
path: root/views/default/friends/picker.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/friends/picker.php')
-rw-r--r--views/default/friends/picker.php121
1 files changed, 62 insertions, 59 deletions
diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php
index 2f51a02d7..db33ffc09 100644
--- a/views/default/friends/picker.php
+++ b/views/default/friends/picker.php
@@ -49,14 +49,14 @@
$users = array();
$activeletters = array();
-
- // Are we displaying form tags and submit buttons?
- // (If we've been given a target, then yes! Otherwise, no.)
- if (isset($vars['formtarget'])) {
- $formtarget = $vars['formtarget'];
- } else {
- $formtarget = false;
- }
+
+ // Are we displaying form tags and submit buttons?
+ // (If we've been given a target, then yes! Otherwise, no.)
+ if (isset($vars['formtarget'])) {
+ $formtarget = $vars['formtarget'];
+ } else {
+ $formtarget = false;
+ }
// Sort users by letter
if (is_array($vars['entities']) && sizeof($vars['entities']))
@@ -93,42 +93,42 @@
}
if (!isset($vars['replacement'])) {
-
+
if ($formtarget) {
?>
-
- <script language="text/javascript">
- $(function() { // onload...do
- $('#collectionMembersForm<?php echo $friendspicker; ?>').submit(function() {
- var inputs = [];
- $(':input', this).each(function() {
- if (this.type != 'checkbox' || (this.type == 'checkbox' && this.checked != false)) {
- inputs.push(this.name + '=' + escape(this.value));
- }
- });
- jQuery.ajax({
- type: "POST",
- data: inputs.join('&'),
- url: this.action,
- success: function(){
- $('a.collectionmembers<?php echo $friendspicker; ?>').click();
- }
-
- });
- return false;
- })
- })
-
- </script>
-
- <!-- Collection members form -->
+
+ <script language="text/javascript">
+ $(function() { // onload...do
+ $('#collectionMembersForm<?php echo $friendspicker; ?>').submit(function() {
+ var inputs = [];
+ $(':input', this).each(function() {
+ if (this.type != 'checkbox' || (this.type == 'checkbox' && this.checked != false)) {
+ inputs.push(this.name + '=' + escape(this.value));
+ }
+ });
+ jQuery.ajax({
+ type: "POST",
+ data: inputs.join('&'),
+ url: this.action,
+ success: function(){
+ $('a.collectionmembers<?php echo $friendspicker; ?>').click();
+ }
+
+ });
+ return false;
+ })
+ })
+
+ </script>
+
+ <!-- Collection members form -->
<form id="collectionMembersForm<?php echo $friendspicker; ?>" action="<?php echo $formtarget; ?>" method="post"> <!-- action="" method=""> -->
-
-<?php
-
- }
-
-?>
+
+<?php
+
+ }
+
+?>
<div class="friendsPicker_wrapper">
<div id="friendsPicker<?php echo $friendspicker; ?>">
@@ -193,7 +193,10 @@
<?php
$col++;
- if ($col == 3) echo "</tr>";
+ if ($col == 3){
+ echo "</tr>";
+ $col = 0;
+ }
}
if ($col < 3) echo "</tr>";
@@ -211,26 +214,26 @@
}
?>
- </div>
-
-<?php
-
- if ($formtarget) {
-
- if (isset($vars['formcontents']))
- echo $vars['formcontents'];
-
+ </div>
+
+<?php
+
+ if ($formtarget) {
+
+ if (isset($vars['formcontents']))
+ echo $vars['formcontents'];
+
?>
- <input type="submit" class="submit_button" value="<?php echo elgg_echo('save'); ?>" />
+ <input type="submit" class="submit_button" value="<?php echo elgg_echo('save'); ?>" />
<!-- onclick="$('a.collectionmembers<?php echo $friendspicker; ?>').click();" -->
<input type="button" class="cancel_button" value="<?php echo elgg_echo('cancel'); ?>" onclick="$('a.collectionmembers<?php echo $friendspicker; ?>').click();" />
- </form>
-
-<?php
-
- }
-
-?>
+ </form>
+
+<?php
+
+ }
+
+?>
</div>
</div>