Skip to:
Content

BuddyPress.org

Ticket #6678: 6678.01.patch

File 6678.01.patch, 2.4 KB (added by dcavins, 4 years ago)
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php

    diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php
    index 736c66c..9ea6e14 100644
    class BP_XProfile_Field_Type_Checkbox extends BP_XProfile_Field_Type { 
    6767                } ?>
    6868
    6969                <div class="checkbox">
    70                         <label for="<?php bp_the_profile_field_input_name(); ?>">
     70                        <label for="<?php bp_the_profile_field_input_name(); ?>" class="option-group-label">
    7171                                <?php bp_the_profile_field_name(); ?>
    7272                                <?php bp_the_profile_field_required_label(); ?>
    7373                        </label>
    class BP_XProfile_Field_Type_Checkbox extends BP_XProfile_Field_Type { 
    138138                                $selected = ' checked="checked"';
    139139                        }
    140140
    141                         $new_html = sprintf( '<label for="%3$s"><input %1$s type="checkbox" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
     141                        $new_html = sprintf( '<label for="%3$s" class="option-label"><input %1$s type="checkbox" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
    142142                                $selected,
    143143                                esc_attr( "field_{$this->field_obj->id}[]" ),
    144144                                esc_attr( "field_{$options[$k]->id}_{$k}" ),
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php

    diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php
    index aa3bc0b..ed59424 100644
    class BP_XProfile_Field_Type_Radiobutton extends BP_XProfile_Field_Type { 
    6666
    6767                <div class="radio">
    6868
    69                         <label for="<?php bp_the_profile_field_input_name(); ?>">
     69                        <label for="<?php bp_the_profile_field_input_name(); ?>" class="option-group-label">
    7070                                <?php bp_the_profile_field_name(); ?>
    7171                                <?php bp_the_profile_field_required_label(); ?>
    7272                        </label>
    class BP_XProfile_Field_Type_Radiobutton extends BP_XProfile_Field_Type { 
    131131                                $selected = ' checked="checked"';
    132132                        }
    133133
    134                         $new_html = sprintf( '<label for="%3$s"><input %1$s type="radio" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
     134                        $new_html = sprintf( '<label for="%3$s" class="option-label"><input %1$s type="radio" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
    135135                                $selected,
    136136                                esc_attr( "field_{$this->field_obj->id}" ),
    137137                                esc_attr( "option_{$options[$k]->id}" ),