Show a notice when changing a multisite's site admin email. props jorbin. Introduce an .inline class that can be used with div.updated and div.error, to prevent the message from being moved to the top of the page. see #12192

git-svn-id: https://develop.svn.wordpress.org/trunk@13446 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-02-26 21:19:10 +00:00
parent 8513d92a8b
commit 4c74091898
3 changed files with 11 additions and 4 deletions

View File

@ -172,9 +172,9 @@ showNotice = {
jQuery(document).ready( function($) {
var lastClicked = false, checks, first, last, checked;
// Move .updated and .error alert boxes
// Move .updated and .error alert boxes. Don't move boxes designed to be inline.
$('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');
$('div.updated, div.error').not('.below-h2').insertAfter( $('div.wrap h2:first') );
$('div.updated, div.error').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') );
// screen settings tab
$('#show-settings-link').click(function () {

File diff suppressed because one or more lines are too long

View File

@ -104,7 +104,14 @@ include('./admin-header.php');
<tr valign="top">
<th scope="row"><label for="new_admin_email"><?php _e('E-mail address') ?> </label></th>
<td><input name="new_admin_email" type="text" id="new_admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text code" />
<span class="setting-description"><?php _e('This address is used for admin purposes.') ?> <?php _e('If you change this we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></span></td>
<span class="setting-description"><?php _e('This address is used for admin purposes. If you change this we will send you an e-mail at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></span>
<?php
if ( $new_admin_email = get_option( 'new_admin_email' ) ) : ?>
<div class="updated inline">
<p><?php printf( __('There is a pending change of the admin e-mail to <code>%s</code>.'), $new_admin_email ); ?></p>
</div>
<?php endif; ?>
</td>
</tr>
<?php } ?>
<tr>