Make WordPress Core

Changeset 7214


Ignore:
Timestamp:
03/10/2008 10:09:26 PM (17 years ago)
Author:
ryan
Message:

Styling update for user edit form. Props mt. fixes #6140

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r7104 r7214  
    132132<?php endif; ?>
    133133
    134 <div class="wrap">
     134<div class="wrap" id="profile-page">
    135135<h2><?php $is_profile_page? _e('Your Profile and Personal Options') : _e('Edit User'); ?></h2>
    136136
     
    148148
    149149<?php if ( rich_edit_exists() ) : // don't bother showing the option if the editor has been removed ?>
    150 <p><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', $profileuser->rich_editing); ?> /> <?php _e('Use the visual editor when writing'); ?></label></p>
     150<table class="form-table">
     151    <tr>
     152        <td colspan="2"><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', $profileuser->rich_editing); ?> /> <?php _e('Use the visual editor when writing'); ?></td>
     153    </tr>
     154</table>
    151155<?php endif; ?>
    152156
     
    157161?>
    158162
    159 <p class="submit"><input type="submit" value="<?php $is_profile_page? _e('Update Profile') : _e('Update User'); ?>" name="submit" /></p>
    160 
    161 <fieldset>
    162 <legend><?php _e('Name'); ?></legend>
    163 <p><label><?php _e('Username: (no editing)'); ?><br />
    164 <input type="text" name="user_login" id="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" />
    165 </label></p>
     163<h3>Name</h3>
     164
     165<table class="form-table">
     166    <tr>
     167        <th><label><?php _e('Username'); ?></label></th>
     168        <td><input type="text" name="user_login" id="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" /> Your username can not be changed</td>
     169    </tr>
    166170
    167171<?php if ( !$is_profile_page ): ?>
    168 <p><label><?php _e('Role:') ?><br />
     172<tr><th><label><?php _e('Role:') ?></label></th>
    169173<?php
    170174// print_r($profileuser);
    171 echo '<select name="role">';
     175echo '<td><select name="role">';
    172176$role_list = '';
    173177$user_has_role = false;
     
    186190else
    187191    $role_list .= '<option value="" selected="selected">' . __('&mdash; No role for this blog &mdash;') . '</option>';
    188 echo $role_list . '</select>';
    189 ?></label></p>
    190 <?php endif; ?>
    191 
    192 <p><label><?php _e('First name:') ?><br />
    193 <input type="text" name="first_name" value="<?php echo $profileuser->first_name ?>" /></label></p>
    194 
    195 <p><label><?php _e('Last name:') ?><br />
    196 <input type="text" name="last_name"  value="<?php echo $profileuser->last_name ?>" /></label></p>
    197 
    198 <p><label><?php _e('Nickname:') ?><br />
    199 <input type="text" name="nickname" value="<?php echo $profileuser->nickname ?>" /></label></p>
    200 
    201 <p><label><?php _e('Display name publicly as:') ?> <br />
    202 <select name="display_name">
    203 <?php
    204     $public_display = array();
    205     $public_display[] = $profileuser->display_name;
    206     $public_display[] = $profileuser->nickname;
    207     $public_display[] = $profileuser->user_login;
    208     $public_display[] = $profileuser->first_name;
    209     $public_display[] = $profileuser->first_name.' '.$profileuser->last_name;
    210     $public_display[] = $profileuser->last_name.' '.$profileuser->first_name;
    211     $public_display = array_unique(array_filter(array_map('trim', $public_display)));
    212     foreach($public_display as $item) {
    213 ?>
    214     <option value="<?php echo $item; ?>"><?php echo $item; ?></option>
    215 <?php
    216     }
    217 ?>
    218 </select></label></p>
    219 </fieldset>
    220 
    221 <fieldset>
    222 <legend><?php _e('Contact Info'); ?></legend>
    223 
    224 <p><label><?php _e('E-mail: (required)') ?><br />
    225 <input type="text" name="email" value="<?php echo $profileuser->user_email ?>" /></label></p>
    226 
    227 <p><label><?php _e('Website:') ?><br />
    228 <input type="text" name="url" value="<?php echo $profileuser->user_url ?>" />
    229 </label></p>
    230 
    231 <p><label><?php _e('AIM:') ?><br />
    232 <input type="text" name="aim" value="<?php echo $profileuser->aim ?>" />
    233 </label></p>
    234 
    235 <p><label><?php _e('Yahoo IM:') ?><br />
    236 <input type="text" name="yim" value="<?php echo $profileuser->yim ?>" />
    237 </label></p>
    238 
    239 <p><label><?php _e('Jabber / Google Talk:') ?><br />
    240 <input type="text" name="jabber" value="<?php echo $profileuser->jabber ?>" /></label>
    241 </p>
    242 </fieldset>
    243 <br style="clear: both;" />
    244 <fieldset>
    245 <legend><?php $is_profile_page? _e('About Yourself') : _e('About the user'); ?></legend>
    246 <p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>
    247 <p><textarea name="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea></p>
    248 </fieldset>
     192echo $role_list . '</select></td></tr>';
     193?>
     194<?php endif; ?>
     195
     196<tr>
     197    <th><label><?php _e('First name') ?></label></th>
     198    <td><input type="text" name="first_name" value="<?php echo $profileuser->first_name ?>" /></td>
     199</tr>
     200
     201<tr>
     202    <th><label><?php _e('Last name') ?></label></th>
     203    <td><input type="text" name="last_name"  value="<?php echo $profileuser->last_name ?>" /></td>
     204</tr>
     205
     206<tr>
     207    <th><label><?php _e('Nickname') ?></label></th>
     208    <td><input type="text" name="nickname" value="<?php echo $profileuser->nickname ?>" /></td>
     209</tr>
     210
     211<tr>
     212    <th><label><?php _e('Display name publicly&nbsp;as') ?> </label></th>
     213    <td>
     214        <select name="display_name">
     215        <?php
     216            $public_display = array();
     217            $public_display[] = $profileuser->display_name;
     218            $public_display[] = $profileuser->nickname;
     219            $public_display[] = $profileuser->user_login;
     220            $public_display[] = $profileuser->first_name;
     221            $public_display[] = $profileuser->first_name.' '.$profileuser->last_name;
     222            $public_display[] = $profileuser->last_name.' '.$profileuser->first_name;
     223            $public_display = array_unique(array_filter(array_map('trim', $public_display)));
     224            foreach($public_display as $item) {
     225        ?>
     226            <option value="<?php echo $item; ?>"><?php echo $item; ?></option>
     227        <?php
     228            }
     229        ?>
     230        </select>
     231    </td>
     232</tr>
     233</table>
     234
     235<h3>Contact Info</h3>
     236
     237<table class="form-table">
     238<tr>
     239    <th><label><?php _e('E-mail') ?></label></th>
     240    <td><input type="text" name="email" value="<?php echo $profileuser->user_email ?>" /> Required</td>
     241</tr>
     242
     243<tr>
     244    <th><label><?php _e('Website') ?></label></th>
     245    <td><input type="text" name="url" value="<?php echo $profileuser->user_url ?>" /></td>
     246</th>
     247
     248<tr>
     249    <th><label><?php _e('AIM') ?></label></th>
     250    <td><input type="text" name="aim" value="<?php echo $profileuser->aim ?>" /></td>
     251</tr>
     252
     253<tr>
     254    <th><label><?php _e('Yahoo IM') ?></label></th>
     255    <td><input type="text" name="yim" value="<?php echo $profileuser->yim ?>" /></td>
     256</tr>
     257
     258<tr>
     259    <th><label><?php _e('Jabber / Google Talk') ?></label></th>
     260    <td><input type="text" name="jabber" value="<?php echo $profileuser->jabber ?>" /></td>
     261</tr>
     262</table>
     263
     264<h3><?php $is_profile_page? _e('About Yourself') : _e('About the user'); ?></h3>
     265
     266<table class="form-table">
     267<tr>
     268    <th><label>Biographical Info</th>
     269    <td><textarea name="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea><br /><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></label></td>
     270</tr>
    249271
    250272<?php
     
    252274if ( $show_password_fields ) :
    253275?>
    254 <fieldset>
    255 <legend><?php $is_profile_page? _e('Update Your Password') : _e("Update User's Password"); ?></legend>
    256 <p class="desc"><?php _e("If you would like to change the password type a new one twice below. Otherwise leave this blank."); ?></p>
    257 <p><label><?php _e('New Password:'); ?><br />
    258 <input type="password" name="pass1" id="pass1" size="16" value="" />
    259 </label></p>
    260 <p><label><?php _e('Type it one more time:'); ?><br />
    261 <input type="password" name="pass2" id="pass2" size="16" value="" />
    262 </label></p>
    263 <?php if ( $is_profile_page ): ?>
    264 <p><strong><?php _e('Password Strength:'); ?></strong></p>
    265 <div id="pass-strength-result"><?php _e('Too short'); ?></div>
    266 <p><?php _e('Hint: Use upper and lower case characters, numbers and symbols like !"?$%^&( in your password.'); ?></p>
    267 <?php endif; ?>
    268 </fieldset>
     276<tr>
     277    <th><label><?php _e('New Password:'); ?></label></th>
     278    <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 />
     279        <input type="password" name="pass2" id="pass2" size="16" value="" /> <?php _e("Type your new password again."); ?><br />
     280        <?php if ( $is_profile_page ): ?>
     281        <p><strong><?php _e('Password Strength:'); ?></strong></p>
     282        <div id="pass-strength-result"><?php _e('Too short'); ?></div> <?php _e('Hint: Use upper and lower case characters, numbers and symbols like !"?$%^&( in your password.'); ?>
     283        <?php endif; ?>
     284    </td>
     285</tr>
     286</table>
    269287<?php endif; ?>
    270288
     
    299317        ?>
    300318    </table>
     319</table>
    301320<p class="submit">
    302321    <input type="hidden" name="action" value="update" />
  • trunk/wp-admin/wp-admin.css

    r7210 r7214  
    796796
    797797.form-table th {
     798    vertical-align: top;
    798799    text-align: left;
    799800    padding: 10px;
     
    806807    border-width: 1px;
    807808    border-style: solid;
     809}
     810
     811#profile-page .form-table input {
     812    width: 200px;
     813}
     814
     815#profile-page .form-table textarea {
     816    width: 500px;
     817    height: 150px;
     818    margin-bottom: 6px;
     819}
     820
     821#pass-strength-result {
     822    width: 197px;
     823    float: left;
     824    margin-right: 5px;
     825    border: 1px solid #ccc !important;
     826}
     827
     828#profile-page .form-table #rich_editing {
     829    width: 20px;
    808830}
    809831
Note: See TracChangeset for help on using the changeset viewer.