Skip to:
Content

BuddyPress.org

Ticket #7083: 7083.02.diff

File 7083.02.diff, 1.8 KB (added by dcavins, 8 years ago)

Also give the option wrapper div a useful class name for CSS targeting.

  • 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 34d752d..112a1ac 100644
    class BP_XProfile_Field_Type_Checkbox extends BP_XProfile_Field_Type { 
    122122
    123123                $option_values = ( $option_values ) ? (array) $option_values : array();
    124124
    125                 $html = '';
     125                $html = sprintf( '<div id="%s" class="input-options checkbox-options">', esc_attr( 'field_' . $this->field_obj->id ) );
    126126
    127127                // Check for updated posted values, but errors preventing them from
    128128                // being saved first time.
    class BP_XProfile_Field_Type_Checkbox extends BP_XProfile_Field_Type { 
    176176                        $html .= apply_filters( 'bp_get_the_profile_field_options_checkbox', $new_html, $options[$k], $this->field_obj->id, $selected, $k );
    177177                }
    178178
    179                 echo $html;
     179                echo $html . '</div>';
    180180        }
    181181
    182182        /**
  • 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 afe37d8..0da32ff 100644
    class BP_XProfile_Field_Type_Radiobutton extends BP_XProfile_Field_Type { 
    111111                $option_value = BP_XProfile_ProfileData::get_value_byid( $this->field_obj->id, $args['user_id'] );
    112112                $options      = $this->field_obj->get_children();
    113113
    114                 $html = sprintf( '<div id="%s">', esc_attr( 'field_' . $this->field_obj->id ) );
     114                $html = sprintf( '<div id="%s" class="input-options radio-button-options">', esc_attr( 'field_' . $this->field_obj->id ) );
    115115
    116116                for ( $k = 0, $count = count( $options ); $k < $count; ++$k ) {
    117117