Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5693 closed defect (bug) (fixed)

bp_profile_visibility_radio_buttons() misses id in label

Reported by: sgr33n's profile SGr33n Owned by: boonebgorges's profile boonebgorges
Milestone: 2.0.2 Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords:
Cc:

Description

Hi,

In the html returned by bp_profile_visibility_radio_buttons() missing the id value for the label tag. The result is that you cannot click on the text.

example code:

<label for="">
<input id="see-field_2_public" type="radio" checked="checked" value="public" name="field_2_visibility">
<span class="field-visibility-text">Everybody</span>
</label>

Reason: echo missing

Attachments (4)

visibility-level-labels.patch (209 bytes) - added by SGr33n 10 years ago.
bp-xprofile-template-2.patch (415 bytes) - added by SGr33n 10 years ago.
bp-xprofile-template-3.patch (24.4 KB) - added by SGr33n 10 years ago.
patch-4.diff (1.3 KB) - added by SGr33n 10 years ago.

Download all attachments as: .zip

Change History (14)

#1 @SGr33n
10 years ago

The second patch also adds classes for radio buttons li containers, in order to make it possible to style them e.g. with an icon.

Before:

<ul class="radio">
	<li>
		<label for="see-field_2_public">
			<input id="see-field_2_public" type="radio" checked="checked" value="public" name="field_2_visibility">
			<span class="field-visibility-text">Chiunque</span>
		</label>
	</li>
	<li>
		<label for="see-field_2_adminsonly">
			<input id="see-field_2_adminsonly" type="radio" value="adminsonly" name="field_2_visibility">
			<span class="field-visibility-text">Solo io</span>
		</label>
	</li>
</ul>

Patch applied:

<ul class="radio">
	<li class="public">
		<label for="see-field_2_public">
			<input id="see-field_2_public" type="radio" checked="checked" value="public" name="field_2_visibility">
			<span class="field-visibility-text">Everyone</span>
		</label>
	</li>
	<li class="adminsonly">
		<label for="see-field_2_adminsonly">
			<input id="see-field_2_adminsonly" type="radio" value="adminsonly" name="field_2_visibility">
			<span class="field-visibility-text">Only me</span>
		</label>
	</li>
</ul>
Last edited 10 years ago by SGr33n (previous) (diff)

#2 @r-a-y
10 years ago

  • Keywords needs-refresh added; has-patch removed

Thanks for creating the ticket and for the patches, SGr33n.

However, your patch format does not work well with our dev workflow.

Can you try creating SVN-compatible patches?
http://make.wordpress.org/core/handbook/working-with-trac/submitting-a-patch/

If you are on Windows and prefer using a GUI rather than command-line, try out Tortoise SVN to create the patch:
http://make.wordpress.org/core/handbook/working-with-patches/create-a-patch-using-tortoisesvn/

#3 @SGr33n
10 years ago

I made a new .patch with linux diff... hope it's good :)

#4 @SGr33n
10 years ago

It's not good :\

#5 @SGr33n
10 years ago

I made it with svn diff :)

Now I know how to do :P

@SGr33n
10 years ago

#6 @boonebgorges
10 years ago

  • Component changed from Core to XProfile
  • Keywords needs-refresh removed

SGr33n - Thanks very much for the properly formatted patch!

The missing echo appears to be a bug that was introduced in r8210, and thus is a regression in BP 2.0. I'm going to put this ticket into 2.0.2 for that reason.

Your request to add classes to the <li> elements seems fine to me, but should go into the 2.1 milestone instead. Would you mind opening a separate ticket that explains the justification for this enhancement, and post a new patch there? Thanks!

#7 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 2.0.2

#8 @boonebgorges
10 years ago

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

In 8489:

Make sure to echo xprofile visibility label 'for' attribute

The echo was mistakenly removed in r8210, with the result that in BP 2.0 it
was not possible to click on the <label> elements to select visibility radio
buttons.

Fixes #5693

Props SGr33n

#9 @boonebgorges
10 years ago

In 8490:

Make sure to echo xprofile visibility label 'for' attribute

The echo was mistakenly removed in r8210, with the result that in BP 2.0 it
was not possible to click on the <label> elements to select visibility radio
buttons.

Fixes #5693

Props SGr33n

#10 @SGr33n
10 years ago

Sure boonebgorges!

See you :)

Note: See TracTickets for help on using tickets.