Ticket #7439: 7439.3.patch
File 7439.3.patch, 8.3 KB (added by , 7 years ago) |
---|
-
src/bp-members/admin/css/admin-rtl.css
117 117 font-size: 14px; 118 118 } 119 119 120 .bp-profile-field > label { /* label takes on left side 200px */ 121 display: inline-block; 122 font-weight: 600; 123 text-align: right; 124 vertical-align: middle; 125 width: 200px; 126 } 127 128 .field_type_textarea > label, 129 .field_type_multiselectbox > label, 130 .field_type_radio .radio > label, 131 .field_type_checkbox .checkbox > label { /* these fields are usually pretty tall, so align the label for better consistency */ 120 .field_type_textarea legend, 121 .field_type_multiselectbox legend, 122 .field_type_radio .radio legend, 123 .field_type_checkbox .checkbox legend { /* these fields are usually pretty tall, so align the label for better consistency */ 132 124 vertical-align: top; 133 125 } 134 126 … … 137 129 text-align: right; 138 130 } 139 131 132 .bp-profile-field .wp-editor-wrap { 133 margin-right: 200px; 134 } 135 136 .field_type_checkbox .description, 137 .field_type_datebox .description, 138 .field_type_radio .description { 139 margin-top: 0; 140 } 141 140 142 .clear-value { /* 'clear value' option also sits in the right side column */ 141 143 display: block; 142 144 font-size: 12px; … … 143 145 margin-right: 200px; 144 146 } 145 147 146 .field_type_checkbox .checkbox > label + label { /* force checkboxes to new lines, in the right side column */ 148 /* force checkboxes to new lines, in the right side column */ 149 .field_type_checkbox label, 150 .field_type_radio label { 147 151 display: block; 152 margin-bottom: 1em; 148 153 margin-right: 200px; 149 154 width: auto; 150 155 } 151 156 157 .field_type_datebox select:nth-of-type(1) { 158 margin-right: 200px; 159 } 160 152 161 .field_type_radio .radio .input-options label, 153 162 .field_type_checkbox .checkbox .input-options label { 154 163 … … 180 189 margin-bottom: 15px; 181 190 } 182 191 192 .field-visibility-settings label { 193 clear: right; 194 display: block; 195 margin-bottom: 1em; 196 } 197 183 198 #normal-sortables .field-visibility-settings legend { /* id required for css selector weight */ 184 199 font-size: 14px; 185 200 font-weight: 600; 186 201 } 187 202 188 #your-profile .bp-profile-field .checkbox legend, 189 #your-profile .bp-profile-field .datebox legend, 190 #your-profile .bp-profile-field .radio legend { 203 #your-profile .bp-profile-field legend { 191 204 float: right; /* Firefox will not apply display: inline-block to legends */ 192 205 font-size: 14px; 193 206 font-weight: 600; 194 207 line-height: 1.4; 208 margin-bottom: 1em; 195 209 text-align: right; 196 210 vertical-align: middle; 197 211 width: 192px; 198 212 } 199 213 200 #your-profile .bp-profile-field .radio legend,201 #your-profile .bp-profile-field .checkbox legend {202 margin-bottom: 20px;203 }204 205 214 .bp-profile-field .radio .clear-value { 206 215 margin-top: 10px; 207 216 } -
src/bp-members/admin/css/admin.css
117 117 font-size: 14px; 118 118 } 119 119 120 .bp-profile-field > label { /* label takes on left side 200px */ 121 display: inline-block; 122 font-weight: 600; 123 text-align: left; 124 vertical-align: middle; 125 width: 200px; 126 } 127 128 .field_type_textarea > label, 129 .field_type_multiselectbox > label, 130 .field_type_radio .radio > label, 131 .field_type_checkbox .checkbox > label { /* these fields are usually pretty tall, so align the label for better consistency */ 120 .field_type_textarea legend, 121 .field_type_multiselectbox legend, 122 .field_type_radio .radio legend, 123 .field_type_checkbox .checkbox legend { /* these fields are usually pretty tall, so align the label for better consistency */ 132 124 vertical-align: top; 133 125 } 134 126 … … 137 129 text-align: left; 138 130 } 139 131 132 .bp-profile-field .wp-editor-wrap { 133 margin-left: 200px; 134 } 135 136 .field_type_checkbox .description, 137 .field_type_datebox .description, 138 .field_type_radio .description { 139 margin-top: 0; 140 } 141 140 142 .clear-value { /* 'clear value' option also sits in the right side column */ 141 143 display: block; 142 144 font-size: 12px; … … 143 145 margin-left: 200px; 144 146 } 145 147 146 .field_type_checkbox .checkbox > label + label { /* force checkboxes to new lines, in the right side column */ 148 /* force checkboxes to new lines, in the right side column */ 149 .field_type_checkbox label, 150 .field_type_radio label { 147 151 display: block; 152 margin-bottom: 1em; 148 153 margin-left: 200px; 149 154 width: auto; 150 155 } 151 156 157 .field_type_datebox select:nth-of-type(1) { 158 margin-left: 200px; 159 } 160 152 161 .field_type_radio .radio .input-options label, 153 162 .field_type_checkbox .checkbox .input-options label { 154 163 … … 180 189 margin-bottom: 15px; 181 190 } 182 191 192 .field-visibility-settings label { 193 clear: left; 194 display: block; 195 margin-bottom: 1em; 196 } 197 183 198 #normal-sortables .field-visibility-settings legend { /* id required for css selector weight */ 184 199 font-size: 14px; 185 200 font-weight: 600; 186 201 } 187 202 188 #your-profile .bp-profile-field .checkbox legend, 189 #your-profile .bp-profile-field .datebox legend, 190 #your-profile .bp-profile-field .radio legend { 203 #your-profile .bp-profile-field legend { 191 204 float: left; /* Firefox will not apply display: inline-block to legends */ 192 205 font-size: 14px; 193 206 font-weight: 600; 194 207 line-height: 1.4; 208 margin-bottom: 1em; 195 209 text-align: left; 196 210 vertical-align: middle; 197 211 width: 192px; 198 212 } 199 213 200 #your-profile .bp-profile-field .radio legend,201 #your-profile .bp-profile-field .checkbox legend {202 margin-bottom: 20px;203 }204 205 214 .bp-profile-field .radio .clear-value { 206 215 margin-top: 10px; 207 216 } -
src/bp-members/admin/js/admin.js
6 6 $( '.visibility-toggle-link' ).on( 'click', function( event ) { 7 7 event.preventDefault(); 8 8 9 $( this ). parent().hide()9 $( this ).attr( 'aria-expanded', 'true' ).parent().hide() 10 10 .siblings( '.field-visibility-settings' ).show(); 11 11 } ); 12 12 … … 13 13 $( '.field-visibility-settings-close' ).on( 'click', function( event ) { 14 14 event.preventDefault(); 15 15 16 $( '.visibility-toggle-link' ).attr( 'aria-expanded', 'false' ); 17 16 18 var settings_div = $(this).parent(), 17 19 vis_setting_text = settings_div.find( 'input:checked' ).parent().text(); 18 20 -
src/bp-xprofile/classes/class-bp-xprofile-user-admin.php
357 357 <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> 358 358 359 359 <div<?php bp_field_css_class( 'bp-profile-field' ); ?>> 360 <fieldset> 360 361 361 362 <?php 362 363 … … 363 364 $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() ); 364 365 $field_type->edit_field_html( array( 'user_id' => $r['user_id'] ) ); 365 366 366 if ( bp_get_the_profile_field_description() ) : ?>367 368 <p class="description"><?php bp_the_profile_field_description(); ?></p>369 370 <?php endif;371 372 367 /** 373 368 * Fires before display of visibility form elements for profile metaboxes. 374 369 * … … 378 373 379 374 $can_change_visibility = bp_current_user_can( 'bp_xprofile_change_field_visibility' ); ?> 380 375 381 <p class="field-visibility-settings-<?php echo $can_change_visibility ? 'toggle' : 'notoggle'; ?>" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id(); ?>"> 376 <p class="field-visibility-settings-<?php echo $can_change_visibility ? 'toggle' : 'notoggle'; ?>" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id(); ?>"><span id="<?php bp_the_profile_field_input_name(); ?>-2"> 382 377 383 378 <?php 384 379 printf( … … 386 381 '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>' 387 382 ); 388 383 ?> 384 </span> 389 385 390 386 <?php if ( $can_change_visibility ) : ?> 391 387 392 <button type="button" class="button visibility-toggle-link" ><?php esc_html_e( 'Change', 'buddypress' ); ?></button>388 <button type="button" class="button visibility-toggle-link" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-2" aria-expanded="false"><?php esc_html_e( 'Change', 'buddypress' ); ?></button> 393 389 394 390 <?php endif; ?> 395 391 </p> … … 417 413 */ 418 414 do_action( 'bp_custom_profile_edit_fields' ); ?> 419 415 416 </fieldset> 420 417 </div> 421 418 422 419 <?php endwhile; // End bp_profile_fields(). ?>