Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/03/2014 07:40:38 AM (11 years ago)
Author:
johnjamesjacoby
Message:

For single admin settings that contain both checkboxes and select drop-downs, use two labels. Fixes poor UX in some browsers. Props netweb. Fixes #2393. (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/admin/settings.php

    r5208 r5242  
    517517    ob_start(); ?>
    518518
    519     <select name="_bbp_default_role" id="_bbp_default_role" <?php bbp_maybe_admin_setting_disabled( '_bbp_default_role' ); ?>>
    520 
     519    </label>
     520    <label for="_bbp_default_role">
     521        <select name="_bbp_default_role" id="_bbp_default_role" <?php bbp_maybe_admin_setting_disabled( '_bbp_default_role' ); ?>>
    521522        <?php foreach ( bbp_get_dynamic_roles() as $role => $details ) : ?>
    522523
     
    524525
    525526        <?php endforeach; ?>
    526 
    527     </select>
     527        </select>
    528528
    529529    <?php $select = ob_get_clean(); ?>
     
    636636    ob_start(); ?>
    637637
    638     <select name="_bbp_thread_replies_depth" id="_bbp_thread_replies_depth" <?php bbp_maybe_admin_setting_disabled( '_bbp_thread_replies_depth' ); ?>>
    639     <?php for ( $i = 2; $i <= $max_depth; $i++ ) : ?>
    640 
    641         <option value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, $current_depth ); ?>><?php echo esc_html( $i ); ?></option>
    642 
    643     <?php endfor; ?>
    644     </select>
     638    </label>
     639    <label for="_bbp_thread_replies_depth">
     640        <select name="_bbp_thread_replies_depth" id="_bbp_thread_replies_depth" <?php bbp_maybe_admin_setting_disabled( '_bbp_thread_replies_depth' ); ?>>
     641        <?php for ( $i = 2; $i <= $max_depth; $i++ ) : ?>
     642
     643            <option value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, $current_depth ); ?>><?php echo esc_html( $i ); ?></option>
     644
     645        <?php endfor; ?>
     646        </select>
    645647
    646648    <?php $select = ob_get_clean(); ?>
Note: See TracChangeset for help on using the changeset viewer.