Ticket #5918: confirmation-messages.patch
File confirmation-messages.patch, 9.3 KB (added by , 10 years ago) |
---|
-
src/bp-templates/bp-legacy/css/buddypress.css
433 433 #buddypress div.activity-comments form.root { 434 434 margin-left: 0; 435 435 } 436 #buddypress div.activity-comments div#message {437 margin-top: 15px;438 margin-bottom: 0;439 }440 436 #buddypress div.activity-comments form .ac-textarea { 441 437 background: #fff; 442 438 border: 1px inset #ccc; … … 504 500 /*-------------------------------------------------------------- 505 501 3.4 - Errors / Success Messages 506 502 --------------------------------------------------------------*/ 507 #buddypress div#message { 508 margin: 0 0 15px; 503 504 body.buddypress #message { 505 width: 100%; 506 position: fixed; 507 z-index: 3; 508 overflow-y: hidden; 509 transition-property: all; 510 transition-duration: 1s; 511 transition-timing-function: cubic-bezier(0, 1, 0.5, 1); 509 512 } 510 #buddypress #message.info { 511 margin-bottom: 0; 513 514 body.buddypress #message > p { 515 background: rgba(255, 255, 255, 0.95); 516 width: 30%; 517 border-radius: 0 0 4px 4px; 518 margin: 0 auto 10px; 519 padding: 10px 20px; 520 text-align: center; 521 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); 522 border-left: 4px solid #7ad03a; 512 523 } 513 #buddypress div#message.updated { 514 clear: both; 524 525 body.buddypress #message.error > p { 526 border-left: 4px solid #dd3d36; 515 527 } 516 #buddypress div#message p, 528 517 529 #sitewide-notice p { 518 530 font-size: 90%; 519 531 display: block; 520 532 padding: 10px 15px; 521 533 } 522 #buddypress div#message.error p {523 background-color: #fdc;524 border: 1px solid #a00;525 clear: left;526 color: #800;527 }528 #buddypress div#message.updated p {529 background-color: #efc;530 border: 1px solid #591;531 color: #250;532 }533 534 #buddypress #pass-strength-result { 534 535 background-color: #eee; 535 536 border-color: #ddd; … … 1119 1120 font-size: 120%; 1120 1121 font-weight: bold; 1121 1122 } 1122 #buddypress div#message p,1123 1123 #sitewide-notice p { 1124 1124 font-weight: normal; 1125 1125 margin-top: 3px; … … 1210 1210 float: left; 1211 1211 margin: 10px 10px 0 0; 1212 1212 } 1213 #buddypress div#item-header div#message.info {1214 line-height: 80%;1215 }1216 1213 #buddypress ul.item-list { 1217 1214 border-top: 1px solid #eaeaea; 1218 1215 width: 100%; -
src/bp-templates/bp-legacy/js/email-validation.js
1 /* Password Verify */ 2 ( function( $ ){ 3 function validate_email_address() { 4 var $email = $( '.email-entry' ), 5 $form = $( '.standard-form' ), 6 emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; 7 8 var error_handler = function() { 9 $email.focus(); 10 return false; 11 }; 12 13 if( !emailReg.test( $email.val() ) ) { 14 $form.bind( 'submit', error_handler ); 15 $email.addClass( 'error' ); 16 if ( ! $email.prev( 'div.error' ).length ) { 17 $email.before( '<div class="error">' + BP_Validation.invalid_email + '</div>' ); 18 } 19 else { 20 // This also could happen 21 $email.prev( 'div.error' ).html( BP_Validation.invalid_email ).css( 'display', 'block' ); 22 } 23 } 24 else { 25 $form.unbind( 'submit' ); 26 if ( $email.prev( 'div.error' ).length ) { 27 $email.removeClass( 'error' ); 28 $email.prev( 'div.error' ).html('').css( 'display', 'none' ); 29 } 30 } 31 return; 32 } 33 34 // Bind validate_email_address to blur event in the email fields 35 $( document ).ready( function() { 36 $( '.email-entry' ).val( '' ).blur( validate_email_address ); 37 }); 38 39 } )( jQuery ); 40 No newline at end of file -
src/bp-templates/bp-legacy/js/buddypress.js
162 162 163 163 /* Check for errors and append if found. */ 164 164 if ( response[0] + response[1] === '-1' ) { 165 form.prepend( response.substr( 2, response.length ) ); 166 jq( '#' + form.attr('id') + ' div.error').hide().fadeIn( 200 ); 165 bp_confirmation_message( response ); 167 166 } else { 168 167 if ( 0 === jq('ul.activity-list').length ) { 169 168 jq('div.error').slideUp(100).remove(); … … 604 603 605 604 /* Check for errors and append if found. */ 606 605 if ( response[0] + response[1] === '-1' ) { 607 form.append( jq( response.substr( 2, response.length ) ).hide().fadeIn( 200 ));606 bp_confirmation_message( response ); 608 607 } else { 609 608 var activity_comments = form.parent(); 610 609 form.fadeOut( 200, function() { … … 673 672 function(response) { 674 673 /* Check for errors and append if found. */ 675 674 if ( response[0] + response[1] === '-1' ) { 676 comment_li.prepend( jq( response.substr( 2, response.length ) ).hide().fadeIn( 200 ));675 bp_confirmation_message( response ); 677 676 } else { 678 677 var children = jq( '#' + comment_li.attr('id') + ' ul' ).children('li'), 679 678 child_count = 0, … … 1851 1850 }); 1852 1851 } 1853 1852 1853 /* Confirmation messages */ 1854 function bp_confirmation_message( response ) { 1855 var topOffset = jq( '.site-header' ).height() + jq( '#wpadminbar' ).height(); 1856 1857 jq( 'body' ).addClass( 'warning-message-on' ).append( jq( response.substr( 2, response.length ) ) ); 1858 jq( '#message' ).css( 'top', topOffset + 'px' ); 1859 1860 setTimeout( function() { 1861 jq( 'body' ).removeClass( 'warning-message-on' ); 1862 jq( 'body #message' ).animate({top: -topOffset }, 100, function() { 1863 jq( this ).remove(); 1864 }); 1865 }, 10000); 1866 } 1867 1854 1868 /* Helper Functions */ 1855 1869 1856 1870 function checkAll() { -
src/bp-templates/bp-legacy/buddypress/members/register.php
31 31 32 32 <label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 33 33 <?php do_action( 'bp_signup_username_errors' ); ?> 34 <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" />34 <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" required /> 35 35 36 36 <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 37 37 <?php do_action( 'bp_signup_email_errors' ); ?> 38 <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" />38 <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" class="email-entry" required /> 39 39 40 40 <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 41 41 <?php do_action( 'bp_signup_password_errors' ); ?> 42 <input type="password" name="signup_password" id="signup_password" value="" class="password-entry" />42 <input type="password" name="signup_password" id="signup_password" value="" class="password-entry" required /> 43 43 <div id="pass-strength-result"></div> 44 44 45 45 <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 46 46 <?php do_action( 'bp_signup_password_confirm_errors' ); ?> 47 <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" class="password-entry-confirm" />47 <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" class="password-entry-confirm" required /> 48 48 49 49 <?php do_action( 'bp_account_details_fields' ); ?> 50 50 -
src/bp-templates/bp-legacy/buddypress/members/single/settings/general.php
10 10 <?php endif; ?> 11 11 12 12 <label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></label> 13 <input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input " />13 <input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input email-entry" /> 14 14 15 15 <label for="pass1"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ); ?></label> 16 16 <input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small password-entry" /> <?php _e( 'New Password', 'buddypress' ); ?><br /> -
src/bp-templates/bp-legacy/buddypress/activity/post-form.php
35 35 <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php esc_attr_e( 'Post Update', 'buddypress' ); ?>" /> 36 36 </div> 37 37 38 <?php if ( bp_is_active( 'groups' ) && !bp_is_my_profile() && !bp_is_group() ) : ?>38 <?php if ( bp_is_active( 'groups' ) && !bp_is_my_profile() && !bp_is_group() && bp_get_total_group_count_for_user() > 0 ) : ?> 39 39 40 40 <div id="whats-new-post-in-box"> 41 41