Ticket #7439: 7439.2.patch
File 7439.2.patch, 10.2 KB (added by , 8 years ago) |
---|
-
src/bp-members/admin/css/admin-rtl.css
127 127 .field_type_checkbox .checkbox > label { /* these fields are usually pretty tall, so align the label for better consistency */ 128 128 vertical-align: top; 129 129 } 130 .bp-profile-field .description { /* description also sits in the right side column */ 130 131 .bp-profile-field .description, 132 .bp-profile-field .input-options { /* description also sits in the right side column */ 131 133 margin: 10px 200px 12px 0; 132 134 text-align: right; 133 135 } 136 137 .bp-profile-field fieldset.checkbox .description, 138 .bp-profile-field fieldset.datebox .description, 139 .bp-profile-field fieldset.radio .description, 140 .bp-profile-field fieldset.textarea .description { 141 margin-top: 0; 142 } 143 144 .bp-profile-field .wp-editor-container { 145 margin-right: 200px; 146 } 147 134 148 .clear-value { /* 'clear value' option also sits in the right side column */ 135 149 display: block; 136 150 font-size: 12px; … … 146 160 /* force checkboxes and radio buttons to new lines */ 147 161 display: block; 148 162 } 149 .field_type_checkbox .checkbox .input-options, 150 .field_type_datebox .datebox .input-options, 151 .field_type_radio .radio .input-options { 152 /* make the checkboxes, select menus, and radio buttons sit in the right side column */ 153 display: inline-block; 154 } 163 155 164 .field-visibility-settings-notoggle, 156 165 .field-visibility-settings-toggle { /* visibility settings go in the left column */ 157 166 margin: 10px 200px 10px 0; … … 169 178 font-weight:600; 170 179 } 171 180 172 #your-profile .bp-profile-field .checkbox legend, 173 #your-profile .bp-profile-field .datebox legend, 174 #your-profile .bp-profile-field .radio legend { 181 #your-profile .bp-profile-field legend { 175 182 float:right; /* Firefox will not apply display: inline-block to legends */ 176 183 font-size: 14px; 177 184 font-weight: 600; 178 185 line-height: 1.4em; 186 margin-bottom: 1em; 179 187 text-align: right; 180 188 vertical-align: middle; 181 189 width: 192px; … … 183 191 184 192 #your-profile .bp-profile-field .radio legend, 185 193 #your-profile .bp-profile-field .checkbox legend { 186 margin-bottom: 20px;194 margin-bottom: 1em; 187 195 } 188 196 197 #your-profile .bp-profile-field .field-visibility-settings div.radio { 198 margin-bottom: 1em; 199 } 200 201 #your-profile .bp-profile-field .field-visibility-settings div.radio label { 202 clear: right; 203 display: block; 204 } 205 189 206 .bp-profile-field .radio .clear-value { 190 207 margin-top: 10px; 208 margin-bottom: 1em; 191 209 } 192 210 193 211 @media screen and (max-width: 782px) { … … 200 218 display: block; 201 219 margin-bottom: 12px; 202 220 } 221 #your-profile .bp-profile-field .multiselectbox select { 222 height: auto; 223 } 203 224 .bp-profile-field .checkbox label, 204 225 .bp-profile-field .radio label { 205 226 line-height: 1.4em; … … 225 246 clear: right; 226 247 margin-right: 50px; 227 248 } 249 .bp-profile-field input[type="email"], 250 .bp-profile-field input[type="number"], 251 .bp-profile-field input[type="text"], 252 .bp-profile-field input[type="url"], 253 .bp-profile-field select:nth-of-type(1) { 254 display: block; 255 } 256 .bp-profile-field .datebox-selects select { 257 display: inline-block; 258 } 259 .bp-profile-field .input-options, 260 .bp-profile-field .wp-editor-container { 261 margin-right: 0; 262 } 228 263 .field-visibility-settings { 229 264 margin-right: 100px; 230 265 } 231 #your-profile .field_multiselectbox select {232 height: auto;233 }234 266 } 235 267 236 268 @media screen and (max-width: 480px) { -
src/bp-members/admin/css/admin.css
127 127 .field_type_checkbox .checkbox > label { /* these fields are usually pretty tall, so align the label for better consistency */ 128 128 vertical-align: top; 129 129 } 130 .bp-profile-field .description { /* description also sits in the right side column */ 130 131 .bp-profile-field .description, 132 .bp-profile-field .input-options { /* description also sits in the right side column */ 131 133 margin: 10px 0 12px 200px; 132 134 text-align: left; 133 135 } 136 137 .bp-profile-field fieldset.checkbox .description, 138 .bp-profile-field fieldset.datebox .description, 139 .bp-profile-field fieldset.radio .description, 140 .bp-profile-field fieldset.textarea .description { 141 margin-top: 0; 142 } 143 144 .bp-profile-field .wp-editor-container { 145 margin-left: 200px; 146 } 147 134 148 .clear-value { /* 'clear value' option also sits in the right side column */ 135 149 display: block; 136 150 font-size: 12px; … … 146 160 /* force checkboxes and radio buttons to new lines */ 147 161 display: block; 148 162 } 149 .field_type_checkbox .checkbox .input-options, 150 .field_type_datebox .datebox .input-options, 151 .field_type_radio .radio .input-options { 152 /* make the checkboxes, select menus, and radio buttons sit in the right side column */ 153 display: inline-block; 154 } 163 155 164 .field-visibility-settings-notoggle, 156 165 .field-visibility-settings-toggle { /* visibility settings go in the left column */ 157 166 margin: 10px 0 10px 200px; … … 169 178 font-weight:600; 170 179 } 171 180 172 #your-profile .bp-profile-field .checkbox legend, 173 #your-profile .bp-profile-field .datebox legend, 174 #your-profile .bp-profile-field .radio legend { 181 #your-profile .bp-profile-field legend { 175 182 float:left; /* Firefox will not apply display: inline-block to legends */ 176 183 font-size: 14px; 177 184 font-weight: 600; 178 185 line-height: 1.4em; 186 margin-bottom: 1em; 179 187 text-align: left; 180 188 vertical-align: middle; 181 189 width: 192px; … … 183 191 184 192 #your-profile .bp-profile-field .radio legend, 185 193 #your-profile .bp-profile-field .checkbox legend { 186 margin-bottom: 20px;194 margin-bottom: 1em; 187 195 } 188 196 197 #your-profile .bp-profile-field .field-visibility-settings div.radio { 198 margin-bottom: 1em; 199 } 200 201 #your-profile .bp-profile-field .field-visibility-settings div.radio label { 202 clear: left; 203 display: block; 204 } 205 189 206 .bp-profile-field .radio .clear-value { 190 207 margin-top: 10px; 208 margin-bottom: 1em; 191 209 } 192 210 193 211 @media screen and (max-width: 782px) { … … 200 218 display: block; 201 219 margin-bottom: 12px; 202 220 } 221 #your-profile .bp-profile-field .multiselectbox select { 222 height: auto; 223 } 203 224 .bp-profile-field .checkbox label, 204 225 .bp-profile-field .radio label { 205 226 line-height: 1.4em; … … 225 246 clear: left; 226 247 margin-left: 50px; 227 248 } 249 .bp-profile-field input[type="email"], 250 .bp-profile-field input[type="number"], 251 .bp-profile-field input[type="text"], 252 .bp-profile-field input[type="url"], 253 .bp-profile-field select:nth-of-type(1) { 254 display: block; 255 } 256 .bp-profile-field .datebox-selects select { 257 display: inline-block; 258 } 259 .bp-profile-field .input-options, 260 .bp-profile-field .wp-editor-container { 261 margin-left: 0; 262 } 228 263 .field-visibility-settings { 229 264 margin-left: 100px; 230 265 } 231 #your-profile .field_multiselectbox select {232 height: auto;233 }234 266 } 235 267 236 268 @media screen and (max-width: 480px) { -
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
362 362 $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() ); 363 363 $field_type->edit_field_html( array( 'user_id' => $r['user_id'] ) ); 364 364 365 if ( bp_get_the_profile_field_description() ) : ?>366 367 <p class="description"><?php bp_the_profile_field_description(); ?></p>368 369 <?php endif;370 371 365 /** 372 366 * Fires before display of visibility form elements for profile metaboxes. 373 367 * … … 377 371 378 372 $can_change_visibility = bp_current_user_can( 'bp_xprofile_change_field_visibility' ); ?> 379 373 380 <p class="field-visibility-settings-<?php echo $can_change_visibility ? 'toggle' : 'notoggle'; ?>" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id(); ?>"> 374 <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"> 381 375 382 376 <?php 383 377 printf( … … 385 379 '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>' 386 380 ); 387 381 ?> 388 382 </span> 389 383 <?php if ( $can_change_visibility ) : ?> 390 384 391 <button type="button" class="button visibility-toggle-link" ><?php esc_html_e( 'Change', 'buddypress' ); ?></button>385 <button type="button" class="button 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> 392 386 393 387 <?php endif; ?> 394 388 </p> … … 402 396 <?php bp_profile_visibility_radio_buttons(); ?> 403 397 404 398 </fieldset> 405 <button type="button" class="button field-visibility-settings-close" ><?php esc_html_e( 'Close', 'buddypress' );?></button>399 <button type="button" class="button field-visibility-settings-close" aria-label="<?php esc_attr_e( 'Close profile field visibility level panel', 'buddypress' ); ?>"><?php _e( 'Close', 'buddypress' ) ?></button> 406 400 </div> 407 401 408 402 <?php endif; ?> … … 416 410 */ 417 411 do_action( 'bp_custom_profile_edit_fields' ); ?> 418 412 413 </fieldset> 414 419 415 </div> 420 416 421 417 <?php endwhile; // End bp_profile_fields(). ?>