Skip to:
Content

BuddyPress.org

Ticket #6290: 6290.ux.patch

File 6290.ux.patch, 5.7 KB (added by r-a-y, 4 years ago)
  • src/bp-core/css/avatar.css

     
     1div.bp-uploader-window {
     2        clear: both;
     3}
     4
    15div.bp-avatar-status {
    26        clear: both;
    37        margin: 1em 0;
  • src/bp-core/js/avatar.js

     
    6363
    6464                        // Group Manage
    6565                        } else if ( $( '#group-settings-form' ).length ) {
    66                                 $( '#group-settings-form p' ).each( function( i ) {
    67                                         if ( 0 !== i ) {
    68                                                 $( this ).remove();
    69                                         }
     66                                $( 'p input' ).each( function( i ) {
     67                                        $( this ).remove();
    7068                                } );
    7169
    72                                 if ( $( '#delete-group-avatar-button' ).length ) {
    73                                         $( '#delete-group-avatar-button' ).remove();
    74                                 }
    75 
    7670                        // Group Create
    7771                        } else if ( $( '#group-create-body' ).length ) {
    7872                                $( '.main-column p #file' ).remove();
  • src/bp-templates/bp-legacy/buddypress/groups/single/admin.php

     
    166166
    167167        <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
    168168
    169                         <p><?php _e("Upload an image to use as a profile photo for this group. The image will be shown on the main group page, and in search results.", 'buddypress' ); ?></p>
    170 
    171                         <p>
    172                                 <input type="file" name="file" id="file" />
    173                                 <input type="submit" name="upload" id="upload" value="<?php esc_attr_e( 'Upload Image', 'buddypress' ); ?>" />
    174                                 <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
    175                         </p>
    176 
    177169                        <?php if ( bp_get_group_has_avatar() ) : ?>
    178170
    179171                                <p><?php _e( "If you'd like to remove the existing group profile photo but not upload a new one, please use the delete group profile photo button.", 'buddypress' ); ?></p>
    180172
    181173                                <?php bp_button( array( 'id' => 'delete_group_avatar', 'component' => 'groups', 'wrapper_id' => 'delete-group-avatar-button', 'link_class' => 'edit', 'link_href' => bp_get_group_avatar_delete_link(), 'link_title' => __( 'Delete Group Profile Photo', 'buddypress' ), 'link_text' => __( 'Delete Group Profile Photo', 'buddypress' ) ) ); ?>
    182174
     175                                <p><?php _e( 'Or:', 'buddypress' ); ?></p>
     176
    183177                        <?php endif; ?>
    184178
     179
     180                        <p><?php _e("Upload an image to use as a profile photo for this group. The image will be shown on the main group page, and in search results.", 'buddypress' ); ?></p>
     181
     182                        <p>
     183                                <input type="file" name="file" id="file" />
     184                                <input type="submit" name="upload" id="upload" value="<?php esc_attr_e( 'Upload Image', 'buddypress' ); ?>" />
     185                                <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
     186                        </p>
     187
    185188                        <?php
    186189                        /**
    187190                         * Load the Avatar UI templates
  • src/bp-templates/bp-legacy/buddypress/members/single/profile/change-avatar.php

     
    1111
    1212<?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>
    1313
    14         <p><?php _e( 'Your profile photo will be used on your profile and throughout the site. If there is a <a href="http://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress' ); ?></p>
     14        <?php if ( bp_get_user_has_avatar() ) : ?>
     15                <p><?php _e( "If you'd like to delete your current profile photo but not upload a new one, please use the delete profile photo button.", 'buddypress' ); ?></p>
     16                <p><a class="button edit" href="<?php bp_avatar_delete_link(); ?>" title="<?php esc_attr_e( 'Delete Profile Photo', 'buddypress' ); ?>"><?php _e( 'Delete My Profile Photo', 'buddypress' ); ?></a></p>
     17
     18                <p><?php _e( 'Or you can upload a new photo:', 'buddypress' ); ?></p>
     19
     20        <?php else : ?>
     21
     22                <p><?php _e( 'Your profile photo will be used on your profile and throughout the site. If there is a <a href="http://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress' ); ?></p>
     23
     24        <?php endif; ?>
    1525
    1626        <form action="" method="post" id="avatar-upload-form" class="standard-form" enctype="multipart/form-data">
    1727
     
    2636                                <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
    2737                        </p>
    2838
    29                         <?php if ( bp_get_user_has_avatar() ) : ?>
    30                                 <p><?php _e( "If you'd like to delete your current profile photo but not upload a new one, please use the delete profile photo button.", 'buddypress' ); ?></p>
    31                                 <p><a class="button edit" href="<?php bp_avatar_delete_link(); ?>" title="<?php esc_attr_e( 'Delete Profile Photo', 'buddypress' ); ?>"><?php _e( 'Delete My Profile Photo', 'buddypress' ); ?></a></p>
    32                         <?php endif; ?>
    33 
    3439                <?php endif; ?>
    3540
    3641                <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
  • src/bp-templates/bp-legacy/css/buddypress.css

     
    841841        position: absolute;
    842842}
    843843
     844#delete-group-avatar-button {
     845        margin-bottom: 2em;
     846}
     847
    844848/*--------------------------------------------------------------
    8458493.6 - Ajax Loading
    846850--------------------------------------------------------------*/
     
    13761380        overflow: auto;
    13771381        list-style: none;
    13781382}
    1379 
     1383body.change-avatar #bp-avatar-delete, body.group-avatar div.bp-avatar-nav {
     1384        display: none;
     1385}
    13801386
    13811387/*--------------------------------------------------------------
    138213883.9 - Private Messaging Threads