Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

#3778 closed enhancement (fixed)

Allow drag and drop custom ordering of profile field options

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 1.7 Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords: has-patch
Cc:

Description

Several of the profile field types (checkbox, radio buttons, multiselect, dropdown) allow the admin to enter options from which users can select. Currently, these options can be ordered by "Order Entered", "Name - Ascending", and "Name - Descending". It would be nice to deprecate these order options in favor of a drag-and-drop custom ordering like we have for the fields themselves.

Attachments (1)

custom-order-profile-options-REV1.diff (8.2 KB) - added by humanshell 12 years ago.

Download all attachments as: .zip

Change History (6)

#1 @humanshell
12 years ago

I've created (and attached) a patch that addresses this issue. In bp-xprofile-classes.php I've slightly altered the output of the html that generates the structure of the various options so they can be manipulated more easily by ui-sortable. In admin.dev.js I've removed or altered some of the javascript in add_option() and added some new functions to enable ui-sortable on the individual field options. There is no ajax processing while reordering fields. The db is updated only when the user clicks save.

This is my first contribution to BuddyPress, and I'm really looking forward to feedback from the community.

#2 @DJPaul
12 years ago

  • Keywords 1.7-early added

Ooh, I like this. I think the patch is pretty good, but let's look at it in detail as soon as we start 1.7 so we can get it in. Fantastic first contribution!

#3 @boonebgorges
12 years ago

  • Keywords has-patch added; needs-patch removed

Agreed, this is a great start. Thanks, humanshell - we'll get to talking nuts and bolts after 1.6 is out.

#4 @boonebgorges
12 years ago

  • Keywords 1.7-early removed
  • Milestone changed from Future Release to 1.7

#5 @johnjamesjacoby
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6294]) XProfile:

  • Allow options to be sorted.
  • Escape all the things.
  • Props humanshell.
  • Fixes #3778.
Note: See TracTickets for help on using tickets.