]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/user-edit.php
Wordpress 2.6.2
[autoinstalls/wordpress.git] / wp-admin / user-edit.php
index 9c298dda30cfe7b3e6de072686d4a03d86a50e57..e7a30cd5150edbfb25a6f5bfd60d5dbb5ffa1685 100644 (file)
@@ -41,6 +41,18 @@ function profile_js ( ) {
                }
 
        }
                }
 
        }
+       
+       function update_nickname ( ) {
+               
+               var nickname = jQuery('#nickname').val();
+               var display_nickname = jQuery('#display_nickname').val();
+               
+               if ( nickname == '' ) {
+                       jQuery('#display_nickname').remove();
+               }
+               jQuery('#display_nickname').val(nickname).html(nickname);
+               
+       }
 
        jQuery(function($) { 
                $('#pass1').keyup( check_pass_strength ) 
 
        jQuery(function($) { 
                $('#pass1').keyup( check_pass_strength ) 
@@ -49,6 +61,7 @@ function profile_js ( ) {
        
        jQuery(document).ready( function() {
                jQuery('#pass1,#pass2').attr('autocomplete','off');
        
        jQuery(document).ready( function() {
                jQuery('#pass1,#pass2').attr('autocomplete','off');
+               jQuery('#nickname').blur(update_nickname);
     });
 </script>
 <?php
     });
 </script>
 <?php
@@ -162,9 +175,9 @@ include ('admin-header.php');
 <?php endif; ?>
 <tr>
 <th scope="row"><?php _e('Admin Color Scheme')?></th>
 <?php endif; ?>
 <tr>
 <th scope="row"><?php _e('Admin Color Scheme')?></th>
-<td>
+<td><fieldset><legend class="hidden"><?php _e('Admin Color Scheme')?></legend>
 <?php
 <?php
-$current_color = get_user_option('admin_color');
+$current_color = get_user_option('admin_color', $user_id);
 if ( empty($current_color) )
        $current_color = 'fresh';
 foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
 if ( empty($current_color) )
        $current_color = 'fresh';
 foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
@@ -181,7 +194,7 @@ foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
        <label for="admin_color_<?php echo $color; ?>"><?php echo $color_info->name ?></label>
 </div>
 <?php endforeach; ?>
        <label for="admin_color_<?php echo $color; ?>"><?php echo $color_info->name ?></label>
 </div>
 <?php endforeach; ?>
-</td>
+</fieldset></td>
 </tr>
 </table>
 
 </tr>
 </table>
 
@@ -245,16 +258,16 @@ echo $role_list . '</select></td></tr>';
                <select name="display_name" id="display_name">
                <?php
                        $public_display = array();
                <select name="display_name" id="display_name">
                <?php
                        $public_display = array();
-                       $public_display[] = $profileuser->display_name;
-                       $public_display[] = $profileuser->nickname;
-                       $public_display[] = $profileuser->user_login;
-                       $public_display[] = $profileuser->first_name;
-                       $public_display[] = $profileuser->first_name.' '.$profileuser->last_name;
-                       $public_display[] = $profileuser->last_name.' '.$profileuser->first_name;
+                       $public_display['display_displayname'] = $profileuser->display_name;
+                       $public_display['display_nickname'] = $profileuser->nickname;
+                       $public_display['display_username'] = $profileuser->user_login;
+                       $public_display['display_firstname'] = $profileuser->first_name;
+                       $public_display['display_firstlast'] = $profileuser->first_name.' '.$profileuser->last_name;
+                       $public_display['display_lastfirst'] = $profileuser->last_name.' '.$profileuser->first_name;
                        $public_display = array_unique(array_filter(array_map('trim', $public_display)));
                        $public_display = array_unique(array_filter(array_map('trim', $public_display)));
-                       foreach($public_display as $item) {
+                       foreach($public_display as $id => $item) {
                ?>
                ?>
-                       <option value="<?php echo $item; ?>"><?php echo $item; ?></option>
+                       <option id="<?php echo $id; ?>" value="<?php echo $item; ?>"><?php echo $item; ?></option>
                <?php
                        }
                ?>
                <?php
                        }
                ?>
@@ -305,11 +318,11 @@ $show_password_fields = apply_filters('show_password_fields', true);
 if ( $show_password_fields ) :
 ?>
 <tr>
 if ( $show_password_fields ) :
 ?>
 <tr>
-       <th><label for="pass1"><?php _e('New Password:'); ?></label></th>
+       <th><label for="pass1"><?php _e('New Password'); ?></label></th>
        <td><input type="password" name="pass1" id="pass1" size="16" value="" /> <?php _e("If you would like to change the password type a new one. Otherwise leave this blank."); ?><br />
                <input type="password" name="pass2" id="pass2" size="16" value="" /> <?php _e("Type your new password again."); ?><br />
                <?php if ( $is_profile_page ): ?>
        <td><input type="password" name="pass1" id="pass1" size="16" value="" /> <?php _e("If you would like to change the password type a new one. Otherwise leave this blank."); ?><br />
                <input type="password" name="pass2" id="pass2" size="16" value="" /> <?php _e("Type your new password again."); ?><br />
                <?php if ( $is_profile_page ): ?>
-               <p><strong><?php _e('Password Strength:'); ?></strong></p>
+               <p><strong><?php _e('Password Strength'); ?></strong></p>
                <div id="pass-strength-result"><?php _e('Too short'); ?></div> <?php _e('Hint: Use upper and lower case characters, numbers and symbols like !"?$%^&amp;( in your password.'); ?>
                <?php endif; ?>
        </td>
                <div id="pass-strength-result"><?php _e('Too short'); ?></div> <?php _e('Hint: Use upper and lower case characters, numbers and symbols like !"?$%^&amp;( in your password.'); ?>
                <?php endif; ?>
        </td>
@@ -329,7 +342,7 @@ if ( $show_password_fields ) :
 <br class="clear" />
        <table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform">
                <tr>
 <br class="clear" />
        <table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform">
                <tr>
-                       <th scope="row"><?php _e('Additional Capabilities:') ?></th>
+                       <th scope="row"><?php _e('Additional Capabilities') ?></th>
                        <td><?php
                        $output = '';
                        foreach($profileuser->caps as $cap => $value) {
                        <td><?php
                        $output = '';
                        foreach($profileuser->caps as $cap => $value) {