Ticket #4224: profile-visibility-enhancements-4224-01.patch
File profile-visibility-enhancements-4224-01.patch, 5.6 KB (added by , 13 years ago) |
---|
-
bp-themes/bp-default/_inc/global.js
808 808 }); 809 809 810 810 /** Profile Visibility Settings *********************************/ 811 811 jq('.field-visibility-settings').hide(); 812 812 jq('.visibility-toggle-link').on( 'click', function() { 813 813 var toggle_div = jq(this).parent(); 814 814 815 jq(toggle_div). slideUp( 200, function(){816 jq(toggle_div).siblings('.field-visibility-settings').slideDown( 200);815 jq(toggle_div).fadeOut( 600, function(){ 816 jq(toggle_div).siblings('.field-visibility-settings').slideDown(400); 817 817 }); 818 818 819 819 return false; … … 822 822 jq('.field-visibility-settings-close').on( 'click', function() { 823 823 var settings_div = jq(this).parent(); 824 824 825 jq(settings_div).slideUp( 200, function(){826 jq(settings_div).siblings('.field-visibility-settings-toggle'). slideDown(200);825 jq(settings_div).slideUp( 400, function(){ 826 jq(settings_div).siblings('.field-visibility-settings-toggle').fadeIn(800); 827 827 }); 828 828 829 829 return false; -
bp-themes/bp-default/members/single/profile/edit.php
114 114 <?php endif; ?> 115 115 116 116 <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> 117 < divclass="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">117 <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 118 118 <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _e( 'Change', 'buddypress' ); ?></a> 119 </ div>119 </p> 120 120 121 121 <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> 122 <label for="field-visibility"><?php _e( 'Who can see this field?', 'buddypress' ) ?></label> 122 <fieldset> 123 <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend> 123 124 124 <?php bp_profile_visibility_radio_buttons() ?>125 <?php bp_profile_visibility_radio_buttons() ?> 125 126 127 </fieldset> 126 128 <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a> 127 129 </div> 128 130 <?php else : ?> -
bp-themes/bp-default/registration/register.php
155 155 <?php endif; ?> 156 156 157 157 <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> 158 < divclass="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">158 <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 159 159 <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link">Change</a> 160 </ div>160 </p> 161 161 162 162 <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> 163 <label for="field-visibility"><?php _e( 'Who can see this field?', 'buddypress' ) ?></label> 163 <fieldset> 164 <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend> 164 165 165 <?php bp_profile_visibility_radio_buttons() ?>166 <?php bp_profile_visibility_radio_buttons() ?> 166 167 168 </fieldset> 167 169 <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a> 170 168 171 </div> 169 172 <?php else : ?> 170 < divclass="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">173 <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 171 174 <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> 172 </ div>175 </p> 173 176 <?php endif ?> 174 177 175 178 -
bp-xprofile/bp-xprofile-template.php
899 899 foreach( bp_xprofile_get_visibility_levels() as $level ) { 900 900 $checked = $level['id'] == bp_get_the_profile_field_visibility_level() ? ' checked="checked" ' : ''; 901 901 902 $html .= '<li>< input type="radio" name="field_' . bp_get_the_profile_field_id() . '_visibility" value="' . esc_attr( $level['id'] ) . '"' . $checked . '> ' . esc_html( $level['label'] ) . '</li>';902 $html .= '<li><label for="see-field_' . esc_attr( $level['id'] ) . '"><input type="radio" id="see-field_' . esc_attr( $level['id'] ) . '" name="field_' . bp_get_the_profile_field_id() . '_visibility" value="' . esc_attr( $level['id'] ) . '"' . $checked . ' /> ' . esc_html( $level['label'] ) . '</label></li>'; 903 903 } 904 904 905 905 $html .= '</ul>';