Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

#7364 closed enhancement (fixed)

Update bp_profile_get_settings_visibility_select template function for additional $args

Reported by: hnla's profile hnla Owned by: hnla's profile hnla
Milestone: 2.8 Priority: low
Severity: minor Version:
Component: Extended Profile Keywords: has-patch commit
Cc:

Description (last modified by hnla)

This patch just adds some additional args passable to the markup to increase flexibility in styling the form controls and allows access to the label class attr.

  • Adds 'before_controls', 'after_controls' to allow wrapping the form controls for additional styling hooks these are inside the form loop avoiding wrapping the 'else' notoggle element too while the existing 'before' & 'after' remain as overall wrapper options.
  • Change label class to take an arg defaulting it to the 'bp-screen-reader-text' string as was before.
  • Change the notoggle element to allow setting/changing the element defaulting it to span as was it's original value.

Attachments (2)

7364.patch (2.9 KB) - added by hnla 8 years ago.
7364-01.patch (2.6 KB) - added by hnla 8 years ago.
Update line indents, add notoggle class arg

Download all attachments as: .zip

Change History (7)

@hnla
8 years ago

#1 @hnla
8 years ago

  • Description modified (diff)

#2 @DJPaul
8 years ago

  • Keywords commit added

@hnla Patch looks great! Good idea. Just check the general indentation when you commit it -- I'm not sure if everything's been indented one times too many, or whether Trac is displaying the file weirdly (most likely).

#3 @hnla
8 years ago

@djpaul I'll check indents, be surprised if I got those wrong given was just slotting into existing format so likely trac/patch is displaying oddly.

#4 @hnla
8 years ago

oops yep looks like I fancied another depth of indentation. Corrected and update patch to include class arg for notoggle element.

@hnla
8 years ago

Update line indents, add notoggle class arg

#5 @hnla
8 years ago

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

In 11258:

Update 'bp_profile_get_settings_visibity_select()' function args

  • Add new args to support elements before & after for the form controls.
  • Add class attr for form label & notoggle elements.
  • Add arg for notoggle tags element.

Update allows developers to manage markup output directly from template, providing an additional set of elements to wrap form controls to allow for styling hooks to change select styling, changing of classes for label & notoggle elements to suit & changing the notoggle tags element if required.

Fixes #7364

Note: See TracTickets for help on using tickets.