Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/02/2008 12:48:45 AM (19 years ago)
Author:
apeatling
Message:

added clear button to radio button fields that cannot have their data removed by deselecting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp_xprofile/bp_xprofile.classes.php

    r6 r7  
    424424        function get_edit_html($value = null)
    425425        {
     426                global $image_base;
     427               
    426428                $asterisk = '';
    427429                if($this->is_required)
    … …  
    482484                                $options = $this->get_children();
    483485                               
    484                                 $html .= '<div class="radio"><span>' . $asterisk . $this->name . ':</span>' . $this->message;
     486                                $html .= '<div class="radio" id="field_' . $this->id . '"><span>' . $asterisk . $this->name . ':</span>' . $this->message;
    485487                                for($k = 0; $k < count($options); $k++)
    486488                                {
    … …  
    500502                                $html .= '<span class="desc">' . $this->desc . '</span>';                               
    501503                                $html .= '</div>';
     504                               
     505                                if(!$this->is_required) {
     506                                        $html .= '<a href="javascript:clear(\'field_' . $this->id . '\');"><img src="' . $image_base . '/cross.gif" alt="Clear" /> Clear</a>';
     507                                }
     508                               
    502509                        break;
    503510                       
Note: See TracChangeset for help on using the changeset viewer.