Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/16/2014 06:20:17 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Update XProfile admin area title CSS and JS to bring it up-to-speed with WordPress 4.0 expectations.

  • Remove placeholder attributes on titles and rely on accompanying labels
  • Show/hide title labels the way WordPress posts currently do
  • Add 20px bottom margin to title wrappers to separate it from descriptions
  • Tweak admin area form markup slightly to accommodate these improvements
File:
1 edited

Legend:

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

    r9075 r9084  
    494494            <?php endif; ?>
    495495
    496             <form action="<?php echo esc_url( $action ); ?>" method="post">
     496            <form id="bp-xprofile-add-field-group" action="<?php echo esc_url( $action ); ?>" method="post">
    497497                <div id="poststuff">
    498498                    <div id="post-body" class="metabox-holder columns-2">
     
    500500                            <div id="titlediv">
    501501                                <div id="titlewrap">
    502                                     <label class="screen-reader-text" id="title-prompt-text" for="title"><?php esc_html_e( 'Field Group Title', 'buddypress') ?></label>
    503                                     <input type="text" name="group_name" autocomplete="off" id="title" value="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr_x( 'Group Name', 'XProfile admin edit group', 'buddypress' ); ?>" />
     502                                    <label id="title-prompt-text" for="title"><?php esc_html_e( 'Field Group Name', 'buddypress') ?></label>
     503                                    <input type="text" name="group_name" id="title" value="<?php echo esc_attr( $this->name ); ?>" autocomplete="off" />
    504504                                </div>
    505505                            </div>
     
    921921                        <div id="post-body-content">
    922922                            <div id="titlediv">
    923                                 <input type="text" name="title" id="title" value="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr_x( 'Field Name', 'XProfile admin edit field', 'buddypress' ); ?>" />
     923                                <div class="titlewrap">
     924                                    <label id="title-prompt-text" for="title"><?php echo esc_attr_x( 'Field Name', 'XProfile admin edit field', 'buddypress' ); ?></label>
     925                                    <input type="text" name="title" id="title" value="<?php echo esc_attr( $this->name ); ?>" autocomplete="off" />
     926                                </div>
    924927                            </div>
    925928                            <div class="postbox">
Note: See TracChangeset for help on using the changeset viewer.