Skip to:
Content

BuddyPress.org

Ticket #6695: 6695.patch

File 6695.patch, 1019 bytes (added by imath, 9 years ago)
  • src/bp-xprofile/bp-xprofile-admin.php

    diff --git src/bp-xprofile/bp-xprofile-admin.php src/bp-xprofile/bp-xprofile-admin.php
    index 08fa7d9..7f3f91c 100644
    function xprofile_ajax_reorder_fields() { 
    492492
    493493        $field_group_id = $_POST['field_group_id'];
    494494
    495         foreach ( (array) $order['field'] as $position => $field_id ) {
     495        foreach ( (array) $order['draggable_field'] as $position => $field_id ) {
    496496                xprofile_update_field_position( (int) $field_id, (int) $position, (int) $field_group_id );
    497497        }
    498498}
    function xprofile_admin_field( $admin_field, $admin_group, $class = '' ) { 
    530530
    531531        $field = $admin_field; ?>
    532532
    533         <fieldset class="sortable<?php echo ' ' . $field->type; if ( !empty( $class ) ) echo ' ' . $class; ?>">
     533        <fieldset id="draggable_field_<?php echo esc_attr( $field->id ); ?>"class="sortable<?php echo ' ' . $field->type; if ( !empty( $class ) ) echo ' ' . $class; ?>">
    534534                <legend>
    535535                        <span>
    536536                                <?php bp_the_profile_field_name(); ?>