Ticket #7348: 7348.3.patch
File 7348.3.patch, 18.3 KB (added by , 8 years ago) |
---|
-
src/bp-templates/bp-legacy/buddypress/members/register.php
182 182 do_action( 'bp_custom_profile_edit_fields_pre_visibility' ); 183 183 184 184 if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> 185 <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 185 <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"><span id="<?php bp_the_profile_field_input_name(); ?>-2"> 186 186 <?php 187 187 printf( 188 188 __( 'This field can be seen by: %s', 'buddypress' ), … … 189 189 '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>' 190 190 ); 191 191 ?> 192 <button type="button" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button> 192 </span> 193 <button type="button" class="visibility-toggle-link" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-2" aria-expanded="false" aria-label="<?php esc_attr_e( 'Change profile field visibility level', 'buddypress' ); ?>"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button> 193 194 </p> 194 195 196 195 197 <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> 196 198 <fieldset> 197 199 <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend> … … 199 201 <?php bp_profile_visibility_radio_buttons() ?> 200 202 201 203 </fieldset> 202 <button type="button" class="field-visibility-settings-close" ><?php _e( 'Close', 'buddypress' ) ?></button>204 <button type="button" class="field-visibility-settings-close" aria-label="<?php esc_attr_e( 'Close profile field visibility level fieldset', 'buddypress' ); ?>"><?php _e( 'Close', 'buddypress' ) ?></button> 203 205 204 206 </div> 205 207 <?php else : ?> … … 222 224 */ 223 225 do_action( 'bp_custom_profile_edit_fields' ); ?> 224 226 225 < p class="description"><?php bp_the_profile_field_description(); ?></p>227 </fieldset> 226 228 227 229 </div> 228 230 -
src/bp-templates/bp-legacy/buddypress/members/single/profile/edit.php
52 52 ?> 53 53 54 54 <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> 55 <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 55 <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"><span id="<?php bp_the_profile_field_input_name(); ?>-2"> 56 56 <?php 57 57 printf( 58 58 __( 'This field can be seen by: %s', 'buddypress' ), … … 59 59 '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>' 60 60 ); 61 61 ?> 62 <button type="button" class="visibility-toggle-link"><?php _e( 'Change', 'buddypress' ); ?></button> 62 </span> 63 <button type="button" class="visibility-toggle-link" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-2" aria-expanded="false" aria-label="<?php esc_attr_e( 'Change profile field visibility level', 'buddypress' ); ?>"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button> 63 64 </p> 64 65 65 66 <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> … … 69 70 <?php bp_profile_visibility_radio_buttons() ?> 70 71 71 72 </fieldset> 72 <button type="button" class="field-visibility-settings-close" ><?php _e( 'Close', 'buddypress' ) ?></button>73 <button type="button" class="field-visibility-settings-close" aria-label="<?php esc_attr_e( 'Close profile field visibility level panel', 'buddypress' ); ?>"><?php _e( 'Close', 'buddypress' ) ?></button> 73 74 </div> 74 75 <?php else : ?> 75 76 <div class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> … … 91 92 */ 92 93 do_action( 'bp_custom_profile_edit_fields' ); ?> 93 94 94 <p class="description"><?php bp_the_profile_field_description(); ?></p> 95 </fieldset> 96 95 97 </div> 96 98 97 99 <?php endwhile; ?> -
src/bp-templates/bp-legacy/js/buddypress.js
1185 1185 jq( '.visibility-toggle-link' ).on( 'click', function( event ) { 1186 1186 event.preventDefault(); 1187 1187 1188 jq( this ). parent().hide().addClass( 'field-visibility-settings-hide' )1188 jq( this ).attr( 'aria-expanded', 'true' ).parent().hide().addClass( 'field-visibility-settings-hide' ) 1189 1189 .siblings( '.field-visibility-settings' ).show().addClass( 'field-visibility-settings-open' ); 1190 1190 } ); 1191 1191 … … 1192 1192 jq( '.field-visibility-settings-close' ).on( 'click', function( event ) { 1193 1193 event.preventDefault(); 1194 1194 1195 jq( '.visibility-toggle-link' ).attr( 'aria-expanded', 'false' ); 1196 1195 1197 var settings_div = jq( this ).parent(), 1196 1198 vis_setting_text = settings_div.find( 'input:checked' ).parent().text(); 1197 1199 -
src/bp-xprofile/bp-xprofile-template.php
1282 1282 // Parse optional arguments. 1283 1283 $r = bp_parse_args( $args, array( 1284 1284 'field_id' => bp_get_the_profile_field_id(), 1285 'before' => '< ulclass="radio">',1286 'after' => '</ ul>',1287 'before_radio' => ' <li class="%s">',1288 'after_radio' => ' </li>',1285 'before' => '<div class="radio">', 1286 'after' => '</div>', 1287 'before_radio' => '', 1288 'after_radio' => '', 1289 1289 'class' => 'bp-xprofile-visibility' 1290 1290 ), 'xprofile_visibility_radio_buttons' ); 1291 1291 -
src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php
73 73 <?php bp_the_profile_field_required_label(); ?> 74 74 </legend> 75 75 76 <?php if ( bp_get_the_profile_field_description() ) : ?> 77 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 78 <?php endif; ?> 79 76 80 <?php 77 81 78 82 /** This action is documented in bp-xprofile/bp-xprofile-classes */ … … 82 86 'user_id' => $user_id 83 87 ) ); ?> 84 88 85 </fieldset>86 87 89 <?php 88 90 } 89 91 -
src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php
81 81 ) ); ?> 82 82 83 83 <fieldset class="datebox"> 84 85 84 <legend> 86 85 <?php bp_the_profile_field_name(); ?> 87 86 <?php bp_the_profile_field_required_label(); ?> 88 87 </legend> 89 88 89 <?php if ( bp_get_the_profile_field_description() ) : ?> 90 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 91 <?php endif; ?> 92 90 93 <div class="input-options datebox-selects"> 91 94 92 95 <?php … … 138 141 139 142 </div> 140 143 141 </fieldset>142 144 <?php 143 145 } 144 146 -
src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php
73 73 'name' => bp_get_the_profile_field_input_name() . '[]', 74 74 ) ); ?> 75 75 76 <label for="<?php bp_the_profile_field_input_name(); ?>[]"> 76 <fieldset class="multiselectbox"> 77 <legend> 77 78 <?php bp_the_profile_field_name(); ?> 78 79 <?php bp_the_profile_field_required_label(); ?> 79 </l abel>80 </legend> 80 81 82 <label for="<?php bp_the_profile_field_input_name(); ?>[]" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php bp_the_profile_field_name(); ?> <?php bp_the_profile_field_required_label(); ?></label> 83 81 84 <?php 82 85 83 86 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 84 87 do_action( bp_get_the_profile_field_errors_action() ); ?> 85 88 86 <select <?php echo $this->get_edit_field_html_elements( $r ); ?> >89 <select <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 87 90 <?php bp_the_profile_field_options( array( 88 91 'user_id' => $user_id 89 92 ) ); ?> 90 93 </select> 91 94 95 <?php if ( bp_get_the_profile_field_description() ) : ?> 96 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 97 <?php endif; ?> 98 92 99 <?php if ( ! bp_get_the_profile_field_is_required() ) : ?> 93 100 94 <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>[]' );" >101 <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>[]' );" role="button"> 95 102 <?php esc_html_e( 'Clear', 'buddypress' ); ?> 96 103 </a> 97 104 -
src/bp-xprofile/classes/class-bp-xprofile-field-type-number.php
65 65 'value' => bp_get_the_profile_field_edit_value() 66 66 ) ); ?> 67 67 68 <label for="<?php bp_the_profile_field_input_name(); ?>"> 68 <fieldset class="number-type"> 69 <legend> 69 70 <?php bp_the_profile_field_name(); ?> 70 71 <?php bp_the_profile_field_required_label(); ?> 71 </l abel>72 </legend> 72 73 74 <label for="<?php bp_the_profile_field_input_name(); ?>" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php bp_the_profile_field_name(); ?> <?php bp_the_profile_field_required_label(); ?></label> 75 73 76 <?php 74 77 75 78 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 76 79 do_action( bp_get_the_profile_field_errors_action() ); ?> 77 80 78 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> >81 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 79 82 83 <?php if ( bp_get_the_profile_field_description() ) : ?> 84 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 85 <?php endif; ?> 86 80 87 <?php 81 88 } 82 89 -
src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php
66 66 } ?> 67 67 68 68 <fieldset class="radio"> 69 70 69 <legend> 71 70 <?php bp_the_profile_field_name(); ?> 72 71 <?php bp_the_profile_field_required_label(); ?> 73 72 </legend> 74 73 74 <?php if ( bp_get_the_profile_field_description() ) : ?> 75 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 76 <?php endif; ?> 77 75 78 <?php 76 79 77 80 /** This action is documented in bp-xprofile/bp-xprofile-classes */ … … 87 90 88 91 <?php endif; ?> 89 92 90 </fieldset>91 92 93 <?php 93 94 } 94 95 … … 176 177 return; 177 178 } ?> 178 179 179 <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>' );" >180 <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>' );" role="button"> 180 181 <?php esc_html_e( 'Clear', 'buddypress' ); ?> 181 182 </a> 182 183 -
src/bp-xprofile/classes/class-bp-xprofile-field-type-selectbox.php
65 65 $user_id = bp_displayed_user_id(); 66 66 } ?> 67 67 68 <label for="<?php bp_the_profile_field_input_name(); ?>"> 68 <fieldset class="selectbox"> 69 <legend> 69 70 <?php bp_the_profile_field_name(); ?> 70 71 <?php bp_the_profile_field_required_label(); ?> 71 </l abel>72 </legend> 72 73 74 <label for="<?php bp_the_profile_field_input_name(); ?>" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php bp_the_profile_field_name(); ?> <?php bp_the_profile_field_required_label(); ?></label> 75 73 76 <?php 74 77 75 78 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 76 79 do_action( bp_get_the_profile_field_errors_action() ); ?> 77 80 78 <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?> >81 <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 79 82 <?php bp_the_profile_field_options( array( 'user_id' => $user_id ) ); ?> 80 83 </select> 81 84 85 <?php if ( bp_get_the_profile_field_description() ) : ?> 86 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 87 <?php endif; ?> 88 82 89 <?php 83 90 } 84 91 -
src/bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php
63 63 64 64 $richtext_enabled = bp_xprofile_is_richtext_enabled_for_field(); ?> 65 65 66 <label for="<?php bp_the_profile_field_input_name(); ?>"> 66 <fieldset class="textarea"> 67 <legend> 67 68 <?php bp_the_profile_field_name(); ?> 68 69 <?php bp_the_profile_field_required_label(); ?> 69 </l abel>70 </legend> 70 71 72 <?php if ( bp_get_the_profile_field_description() ) : ?> 73 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 74 <?php endif; ?> 75 76 <label for="<?php bp_the_profile_field_input_name(); ?>" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php bp_the_profile_field_name(); ?> <?php bp_the_profile_field_required_label(); ?></label> 77 71 78 <?php 72 79 73 80 /** This action is documented in bp-xprofile/bp-xprofile-classes */ … … 81 88 82 89 ?> 83 90 84 <textarea <?php echo $this->get_edit_field_html_elements( $r ); ?> ><?php bp_the_profile_field_edit_value(); ?></textarea>91 <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> 85 92 86 93 <?php 87 94 -
src/bp-xprofile/classes/class-bp-xprofile-field-type-textbox.php
64 64 'value' => bp_get_the_profile_field_edit_value(), 65 65 ) ); ?> 66 66 67 <label for="<?php bp_the_profile_field_input_name(); ?>"> 67 <fieldset class="textbox"> 68 <legend> 68 69 <?php bp_the_profile_field_name(); ?> 69 70 <?php bp_the_profile_field_required_label(); ?> 70 </l abel>71 </legend> 71 72 73 <label for="<?php bp_the_profile_field_input_name(); ?>" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php bp_the_profile_field_name(); ?> <?php bp_the_profile_field_required_label(); ?></label> 74 72 75 <?php 73 76 74 77 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 75 78 do_action( bp_get_the_profile_field_errors_action() ); ?> 76 79 77 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> >80 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 78 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; ?> 85 79 86 <?php 80 87 } 81 88 -
src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php
66 66 'value' => esc_url( bp_get_the_profile_field_edit_value() ), 67 67 ) ); ?> 68 68 69 <label for="<?php bp_the_profile_field_input_name(); ?>"> 69 <fieldset class="url"> 70 <legend> 70 71 <?php bp_the_profile_field_name(); ?> 71 72 <?php bp_the_profile_field_required_label(); ?> 72 </l abel>73 </legend> 73 74 75 <label for="<?php bp_the_profile_field_input_name(); ?>" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php bp_the_profile_field_name(); ?> <?php bp_the_profile_field_required_label(); ?></label> 76 74 77 <?php 75 78 76 79 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 77 80 do_action( bp_get_the_profile_field_errors_action() ); ?> 78 81 79 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> >82 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 80 83 84 <?php if ( bp_get_the_profile_field_description() ) : ?> 85 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 86 <?php endif; ?> 87 81 88 <?php 82 89 } 83 90