Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/30/2014 08:19:13 PM (11 years ago)
Author:
imath
Message:

In case of an xProfile field requiring options (eg: selectbox, radio buttons), make sure the first option doesn't show a delete link when creating or editing this type of fields.

See #5647

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/bp-xprofile/bp-xprofile-classes.php

    r8699 r8739  
    28402840                            <input type="<?php echo esc_attr( $control_type ); ?>" name="<?php echo esc_attr( "isDefault_{$type}_option{$default_name}" ); ?>" <?php checked( $options[$i]->is_default_option, true ); ?> value="<?php echo esc_attr( $j ); ?>" />
    28412841                            <span><?php _e( 'Default Value', 'buddypress' ); ?></span>
    2842                             <a href="<?php echo esc_url( 'users.php?page=bp-profile-setup&amp;mode=delete_option&amp;option_id=' . $options[$i]->id ); ?>" class="ajax-option-delete" id="delete-<?php echo esc_attr( $options[$i]->id ); ?>">[x]</a>
     2842
     2843                            <?php if ( 1 <= $i ) : ?>
     2844                                <a href="<?php echo esc_url( 'users.php?page=bp-profile-setup&amp;mode=delete_option&amp;option_id=' . $options[$i]->id ); ?>" class="ajax-option-delete" id="delete-<?php echo esc_attr( $options[$i]->id ); ?>">[x]</a>
     2845                            <?php endif ;?>
     2846                           
    28432847                        </p>
    28442848                    <?php endfor; ?>
Note: See TracChangeset for help on using the changeset viewer.