Skip to:
Content

BuddyPress.org

Changeset 11014


Ignore:
Timestamp:
08/15/2016 10:09:43 PM (5 years ago)
Author:
mercime
Message:

Improve markup of the BuddyPress Tools screen.

Make the screen accessible:

  • remove an extra fieldset
  • remove table markup from fieldset
  • improve legibility of long text for desktop

Fixes #7219.

Location:
trunk/src/bp-core/admin
Files:
3 edited

Legend:

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

    r10828 r11014  
    2222        <h1><?php esc_html_e( 'BuddyPress Tools', 'buddypress' ) ?></h1>
    2323
    24         <p>
    25             <?php esc_html_e( 'BuddyPress keeps track of various relationships between members, groups, and activity items. Occasionally these relationships become out of sync, most often after an import, update, or migration.', 'buddypress' ); ?>
    26             <?php esc_html_e( 'Use the tools below to manually recalculate these relationships.', 'buddypress' ); ?>
     24        <p><?php esc_html_e( 'BuddyPress keeps track of various relationships between members, groups, and activity items. Occasionally these relationships become out of sync, most often after an import, update, or migration.', 'buddypress' ); ?></p>
     25        <p><?php esc_html_e( 'Use the tools below to manually recalculate these relationships.', 'buddypress' ); ?>
    2726        </p>
    2827        <p class="description"><?php esc_html_e( 'Some of these tools create substantial database overhead. Avoid running more than one repair job at a time.', 'buddypress' ); ?></p>
    2928
    3029        <form class="settings" method="post" action="">
    31             <table class="form-table">
    32                 <tbody>
    33                     <tr valign="top">
    34                         <th scope="row"><?php esc_html_e( 'Repair tools', 'buddypress' ) ?></th>
    35                         <td>
    36                             <fieldset>
    37                                 <legend class="screen-reader-text"><span><?php
    38                                     /* translators: accessibility text */
    39                                     esc_html_e( 'Repair', 'buddypress' );
    40                                 ?></span></legend>
    41 
    42                                 <?php foreach ( bp_admin_repair_list() as $item ) : ?>
    43 
    44                                     <label for="<?php echo esc_attr( str_replace( '_', '-', $item[0] ) ); ?>"><input type="checkbox" class="checkbox" name="<?php echo esc_attr( $item[0] ) . '" id="' . esc_attr( str_replace( '_', '-', $item[0] ) ); ?>" value="1" /> <?php echo esc_html( $item[1] ); ?></label><br />
    45 
    46                                 <?php endforeach; ?>
    47 
    48                             </fieldset>
    49                         </td>
    50                     </tr>
    51                 </tbody>
    52             </table>
    53 
    54             <fieldset class="submit">
    55                 <input class="button-primary" type="submit" name="bp-tools-submit" value="<?php esc_attr_e( 'Repair Items', 'buddypress' ); ?>" />
    56                 <?php wp_nonce_field( 'bp-do-counts' ); ?>
     30
     31            <fieldset>
     32                <legend><?php esc_html_e( 'Repair tools', 'buddypress' ) ?></legend>
     33
     34                <div class="checkbox">
     35                <?php foreach ( bp_admin_repair_list() as $item ) : ?>
     36                    <label for="<?php echo esc_attr( str_replace( '_', '-', $item[0] ) ); ?>"><input type="checkbox" class="checkbox" name="<?php echo esc_attr( $item[0] ) . '" id="' . esc_attr( str_replace( '_', '-', $item[0] ) ); ?>" value="1" /> <?php echo esc_html( $item[1] ); ?></label>
     37                <?php endforeach; ?>
     38                </div>
     39
     40                <p class="submit">
     41                    <input class="button-primary" type="submit" name="bp-tools-submit" value="<?php esc_attr_e( 'Repair Items', 'buddypress' ); ?>" />
     42                    <?php wp_nonce_field( 'bp-do-counts' ); ?>
     43                </p>
     44
    5745            </fieldset>
     46
    5847        </form>
     48
    5949    </div>
     50
    6051    <?php
    6152}
  • trunk/src/bp-core/admin/css/common-rtl.css

    r10988 r11014  
    21213.0 User's Lists
    22224.0 Emails - Edit page
     235.0 Tools - BuddyPress
    2324------------------------------------------------------------------------------*/
    2425
     
    492493    text-indent: -25px;
    493494}
     495
     496/*------------------------------------------------------------------------------
     497 * 5.0 Tools - BuddyPress
     498 *----------------------------------------------------------------------------*/
     499.tools_page_bp-tools .wrap {
     500    max-width: 950px;
     501}
     502
     503.tools_page_bp-tools p {
     504    line-height: 2;
     505}
     506
     507.tools_page_bp-tools fieldset {
     508    margin: 2em 0 0;
     509}
     510
     511.tools_page_bp-tools legend {
     512    color: #23282d;
     513    font-size: 1.3em;
     514    font-weight: 600px;
     515    margin: 1em 0;
     516}
     517
     518.tools_page_bp-tools label {
     519    clear: right;
     520    display: block;
     521    line-height: 1.5em;
     522    margin: 0 0 1em;
     523    vertical-align: middle;
     524}
     525
     526@media screen and (max-width: 782px) {
     527    .tools_page_bp-tools p {
     528        line-height: 1.5;
     529    }
     530    .tools_page_bp-tools label {
     531        margin-bottom: 1em;
     532        padding-left: 25px;
     533        text-indent: -33px;
     534    }
     535    .tools_page_bp-tools .checkbox {
     536        padding: 0 30px 0 0;
     537    }
     538}
  • trunk/src/bp-core/admin/css/common.css

    r10988 r11014  
    21213.0 User's Lists
    22224.0 Emails - Edit page
     235.0 Tools - BuddyPress
    2324------------------------------------------------------------------------------*/
    2425
     
    492493    text-indent: -25px;
    493494}
     495
     496/*------------------------------------------------------------------------------
     497 * 5.0 Tools - BuddyPress
     498 *----------------------------------------------------------------------------*/
     499.tools_page_bp-tools .wrap {
     500    max-width: 950px;
     501}
     502
     503.tools_page_bp-tools p {
     504    line-height: 2;
     505}
     506
     507.tools_page_bp-tools fieldset {
     508    margin: 2em 0 0;
     509}
     510
     511.tools_page_bp-tools legend {
     512    color: #23282d;
     513    font-size: 1.3em;
     514    font-weight: 600px;
     515    margin: 1em 0;
     516}
     517
     518.tools_page_bp-tools label {
     519    clear: left;
     520    display: block;
     521    line-height: 1.5em;
     522    margin: 0 0 1em;
     523    vertical-align: middle;
     524}
     525
     526@media screen and (max-width: 782px) {
     527    .tools_page_bp-tools p {
     528        line-height: 1.5;
     529    }
     530    .tools_page_bp-tools label {
     531        margin-bottom: 1em;
     532        padding-right: 25px;
     533        text-indent: -33px;
     534    }
     535    .tools_page_bp-tools .checkbox {
     536        padding: 0 0 0 30px;
     537    }
     538}
Note: See TracChangeset for help on using the changeset viewer.