Skip to:
Content

Changeset 11617


Ignore:
Timestamp:
06/23/2017 09:05:04 PM (13 months ago)
Author:
mercime
Message:

xProfile: Move descriptions to right beside respective form controls.

See #7348.

Location:
trunk/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/members/register.php

    r11246 r11617  
    223223                            do_action( 'bp_custom_profile_edit_fields' ); ?>
    224224
    225                             <p class="description"><?php bp_the_profile_field_description(); ?></p>
    226 
    227225                        </div>
    228226
  • trunk/src/bp-templates/bp-legacy/buddypress/members/single/profile/edit.php

    r11591 r11617  
    9292                do_action( 'bp_custom_profile_edit_fields' ); ?>
    9393
    94                 <p class="description"><?php bp_the_profile_field_description(); ?></p>
    9594            </div>
    9695
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php

    r11400 r11617  
    7373                <?php bp_the_profile_field_required_label(); ?>
    7474            </legend>
     75
     76            <?php if ( bp_get_the_profile_field_description() ) : ?>
     77                <p class="description" tabindex="0"><?php bp_the_profile_field_description(); ?></p>
     78            <?php endif; ?>
    7579
    7680            <?php
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php

    r11253 r11617  
    8787                <?php bp_the_profile_field_required_label(); ?>
    8888            </legend>
     89
     90            <?php if ( bp_get_the_profile_field_description() ) : ?>
     91                <p class="description" tabindex="0"><?php bp_the_profile_field_description(); ?></p>
     92            <?php endif; ?>
    8993
    9094            <div class="input-options datebox-selects">
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php

    r10828 r11617  
    8484        do_action( bp_get_the_profile_field_errors_action() ); ?>
    8585
    86         <select <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     86        <select <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    8787            <?php bp_the_profile_field_options( array(
    8888                'user_id' => $user_id
    8989            ) ); ?>
    9090        </select>
     91
     92        <?php if ( bp_get_the_profile_field_description() ) : ?>
     93            <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p>
     94        <?php endif; ?>
    9195
    9296        <?php if ( ! bp_get_the_profile_field_is_required() ) : ?>
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-number.php

    r10828 r11617  
    7676        do_action( bp_get_the_profile_field_errors_action() ); ?>
    7777
    78         <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     78        <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
     79
     80        <?php if ( bp_get_the_profile_field_description() ) : ?>
     81            <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p>
     82        <?php endif; ?>
    7983
    8084        <?php
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php

    r11400 r11617  
    7272                <?php bp_the_profile_field_required_label(); ?>
    7373            </legend>
     74
     75            <?php if ( bp_get_the_profile_field_description() ) : ?>
     76                <p class="description" tabindex="0"><?php bp_the_profile_field_description(); ?></p>
     77            <?php endif; ?>
    7478
    7579            <?php
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-selectbox.php

    r10828 r11617  
    7676        do_action( bp_get_the_profile_field_errors_action() ); ?>
    7777
    78         <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?>>
     78        <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    7979            <?php bp_the_profile_field_options( array( 'user_id' => $user_id ) ); ?>
    8080        </select>
     81
     82        <?php if ( bp_get_the_profile_field_description() ) : ?>
     83            <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p>
     84        <?php endif; ?>
    8185
    8286        <?php
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php

    r10417 r11617  
    8282            ?>
    8383
    84             <textarea <?php echo $this->get_edit_field_html_elements( $r ); ?>><?php bp_the_profile_field_edit_value(); ?></textarea>
     84            <textarea <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_edit_value(); ?></textarea>
    8585
    8686            <?php
     
    118118            );
    119119        }
     120
     121        if ( bp_get_the_profile_field_description() ) : ?>
     122            <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p>
     123        <?php endif;
    120124    }
    121125
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-textbox.php

    r10828 r11617  
    7575        do_action( bp_get_the_profile_field_errors_action() ); ?>
    7676
    77         <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     77        <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
     78
     79        <?php if ( bp_get_the_profile_field_description() ) : ?>
     80            <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p>
     81        <?php endif; ?>
    7882
    7983        <?php
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php

    r11033 r11617  
    7777        do_action( bp_get_the_profile_field_errors_action() ); ?>
    7878
    79         <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     79        <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
     80
     81        <?php if ( bp_get_the_profile_field_description() ) : ?>
     82            <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p>
     83        <?php endif; ?>
    8084
    8185        <?php
Note: See TracChangeset for help on using the changeset viewer.