Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/24/2015 03:02:10 AM (11 years ago)
Author:
johnjamesjacoby
Message:

XProfile: First pass at refreshing the the "Profile Fields" UI to better match current WordPress design direction.

Likely more iteration needed here, as everyone is a critic. See #6318.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-admin.php

    r9471 r9639  
    7373                </h2>
    7474
    75                 <p><?php echo sprintf( __( 'Fields in the "%s" group will appear on the signup page.', 'buddypress' ), esc_html( stripslashes( bp_get_option( 'bp-xprofile-base-group-name' ) ) ) ) ?></p>
    76 
    7775                <form action="" id="profile-field-form" method="post">
    7876
     
    8684
    8785                                <div id="message" class="<?php echo $type; ?> fade">
    88                                         <p><?php echo esc_html( esc_attr( $message ) ); ?></p>
     86                                        <p><?php echo esc_html( $message ); ?></p>
    8987                                </div>
    9088
     
    9694                                        <?php if ( !empty( $groups ) ) : foreach ( $groups as $group ) : ?>
    9795
    98                                                 <li id="group_<?php echo $group->id; ?>"><a href="#tabs-<?php echo $group->id; ?>" class="ui-tab"><?php echo esc_attr( $group->name ); ?><?php if ( !$group->can_delete ) : ?> <?php _e( '(Primary)', 'buddypress'); endif; ?></a></li>
     96                                                <li id="group_<?php echo esc_attr( $group->id ); ?>">
     97                                                        <a href="#tabs-<?php echo esc_attr( $group->id ); ?>" class="ui-tab">
     98                                                                <?php echo esc_attr( $group->name ); ?>
     99
     100                                                                <?php if ( !$group->can_delete ) : ?>
     101                                                                        <?php _e( '(Primary)', 'buddypress'); ?>
     102                                                                <?php endif; ?>
     103
     104                                                                <span class="spinner"></span>
     105                                                        </a>
     106                                                </li>
    99107
    100108                                        <?php endforeach; endif; ?>
     
    108116                                        </noscript>
    109117
    110                                         <div id="tabs-<?php echo $group->id; ?>" class="tab-wrapper">
     118                                        <div id="tabs-<?php echo esc_attr( $group->id ); ?>" class="tab-wrapper">
    111119                                                <div class="tab-toolbar">
    112120                                                        <div class="tab-toolbar-left">
     
    116124                                                                <?php if ( $group->can_delete ) : ?>
    117125
    118                                                                         <a class="confirm submitdelete deletion ajax-option-delete" href="users.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>
     126                                                                        <div class="delete-button">
     127                                                                                <a class="confirm submitdelete deletion ajax-option-delete" href="users.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>
     128                                                                        </div>
    119129
    120130                                                                <?php endif; ?>
     
    135145                                                </div>
    136146
    137                                                 <fieldset id="<?php echo $group->id; ?>" class="connectedSortable field-group">
    138 
    139                                                         <?php if ( $group->description ) : ?>
    140 
    141                                                                 <legend><?php echo esc_attr( $group->description ) ?></legend>
    142 
    143                                                         <?php endif;
     147                                                <?php if ( ! empty( $group->description ) ) : ?>
     148
     149                                                        <p><?php echo esc_html( $group->description ); ?></p>
     150
     151                                                <?php endif; ?>
     152
     153                                                <fieldset id="<?php echo esc_attr( $group->id ); ?>" class="connectedSortable field-group">
     154                                                        <legend class="screen-reader-text"><?php printf( esc_html__( 'Fields for "%s" Group', 'buddypress' ), $group->name ); ?></legend>
     155
     156                                                        <?php
    144157
    145158                                                        if ( !empty( $group->fields ) ) :
     
    150163
    151164                                                                        $class = '';
    152                                                                         if ( !$field->can_delete )
     165                                                                        if ( empty( $field->can_delete ) ) {
    153166                                                                                $class = ' core nodrag';
    154 
    155                                                                         /* This function handles the WYSIWYG profile field
    156                                                                         * display for the xprofile admin setup screen
    157                                                                         */
     167                                                                        }
     168
     169                                                                        /**
     170                                                                         * This function handles the WYSIWYG profile field
     171                                                                         * display for the xprofile admin setup screen
     172                                                                         */
    158173                                                                        xprofile_admin_field( $field, $group, $class );
    159174
     
    167182
    168183                                                </fieldset>
     184
     185                                                <?php if ( empty( $group->can_delete ) ) : ?>
     186
     187                                                        <p><?php esc_html_e( '* Fields in this group appear on the signup page.', 'buddypress' ); ?></p>
     188
     189                                                <?php endif; ?>
     190
    169191                                        </div>
    170192
     
    176198                                <?php endif; ?>
    177199
    178                                 <div id="tabs-bottom">&nbsp;</div>
    179200                        </div>
    180201                </form>
Note: See TracChangeset for help on using the changeset viewer.