Ticket #7348: 7348.2.patch
File 7348.2.patch, 17.8 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 78 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 79 80 <?php endif; ?> 81 76 82 <?php 77 83 78 84 /** This action is documented in bp-xprofile/bp-xprofile-classes */ … … 82 88 'user_id' => $user_id 83 89 ) ); ?> 84 90 85 </fieldset>86 87 91 <?php 88 92 } 89 93 -
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 91 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 92 93 <?php endif; ?> 94 90 95 <div class="input-options datebox-selects"> 91 96 92 97 <?php … … 138 143 139 144 </div> 140 145 141 </fieldset>142 146 <?php 143 147 } 144 148 -
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(); ?> 80 </legend> 81 82 <label for="<?php bp_the_profile_field_input_name(); ?>[]" class="bp-screen-reader-text"> 83 <?php bp_the_profile_field_name(); ?> 79 84 </label> 80 85 81 86 <?php … … 83 88 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 84 89 do_action( bp_get_the_profile_field_errors_action() ); ?> 85 90 86 <select <?php echo $this->get_edit_field_html_elements( $r ); ?> >91 <select <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 87 92 <?php bp_the_profile_field_options( array( 88 93 'user_id' => $user_id 89 94 ) ); ?> 90 95 </select> 91 96 97 <?php if ( bp_get_the_profile_field_description() ) : ?> 98 99 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 100 101 <?php endif; ?> 102 92 103 <?php if ( ! bp_get_the_profile_field_is_required() ) : ?> 93 104 94 <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>[]' );" >105 <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>[]' );" role="button"> 95 106 <?php esc_html_e( 'Clear', 'buddypress' ); ?> 96 107 </a> 97 108 -
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(); ?> 72 </legend> 73 74 <label for="<?php bp_the_profile_field_input_name(); ?>" class="bp-screen-reader-text"> 75 <?php bp_the_profile_field_name(); ?> 71 76 </label> 72 77 73 78 <?php … … 75 80 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 76 81 do_action( bp_get_the_profile_field_errors_action() ); ?> 77 82 78 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> >83 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 79 84 85 <?php if ( bp_get_the_profile_field_description() ) : ?> 86 87 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 88 89 <?php endif; ?> 90 80 91 <?php 81 92 } 82 93 -
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 76 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 77 78 <?php endif; ?> 79 75 80 <?php 76 81 77 82 /** This action is documented in bp-xprofile/bp-xprofile-classes */ … … 87 92 88 93 <?php endif; ?> 89 94 90 </fieldset>91 92 95 <?php 93 96 } 94 97 … … 176 179 return; 177 180 } ?> 178 181 179 <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>' );" >182 <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>' );" role="button"> 180 183 <?php esc_html_e( 'Clear', 'buddypress' ); ?> 181 184 </a> 182 185 -
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(); ?> 72 </legend> 73 74 <label for="<?php bp_the_profile_field_input_name(); ?>" class="bp-screen-reader-text"> 75 <?php bp_the_profile_field_name(); ?> 71 76 </label> 72 77 73 78 <?php … … 75 80 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 76 81 do_action( bp_get_the_profile_field_errors_action() ); ?> 77 82 78 <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?> >83 <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 79 84 <?php bp_the_profile_field_options( array( 'user_id' => $user_id ) ); ?> 80 85 </select> 81 86 87 <?php if ( bp_get_the_profile_field_description() ) : ?> 88 89 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 90 91 <?php endif; ?> 92 82 93 <?php 83 94 } 84 95 -
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(); ?> 70 </legend> 71 72 <?php if ( bp_get_the_profile_field_description() ) : ?> 73 74 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 75 76 <?php endif; ?> 77 78 <label for="<?php bp_the_profile_field_input_name(); ?>" class="bp-screen-reader-text"> 79 <?php bp_the_profile_field_name(); ?> 69 80 </label> 70 81 71 82 <?php … … 81 92 82 93 ?> 83 94 84 <textarea <?php echo $this->get_edit_field_html_elements( $r ); ?> ><?php bp_the_profile_field_edit_value(); ?></textarea>95 <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 96 86 97 <?php 87 98 -
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(); ?> 71 </legend> 72 73 <label for="<?php bp_the_profile_field_input_name(); ?>" class="bp-screen-reader-text"> 74 <?php bp_the_profile_field_name(); ?> 70 75 </label> 71 76 72 77 <?php … … 74 79 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 75 80 do_action( bp_get_the_profile_field_errors_action() ); ?> 76 81 77 <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"> 78 83 84 <?php if ( bp_get_the_profile_field_description() ) : ?> 85 86 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 87 88 <?php endif; ?> 89 79 90 <?php 80 91 } 81 92 -
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(); ?> 73 </legend> 74 75 <label for="<?php bp_the_profile_field_input_name(); ?>" class="bp-screen-reader-text"> 76 <?php bp_the_profile_field_name(); ?> 72 77 </label> 73 78 74 79 <?php … … 76 81 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 77 82 do_action( bp_get_the_profile_field_errors_action() ); ?> 78 83 79 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> >84 <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 80 85 86 <?php if ( bp_get_the_profile_field_description() ) : ?> 87 88 <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p> 89 90 <?php endif; ?> 91 81 92 <?php 82 93 } 83 94