Styling update for user edit form. Props mt. fixes #6140
git-svn-id: https://develop.svn.wordpress.org/trunk@7214 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ad85a75542
commit
cb5dcfe1e1
@ -131,7 +131,7 @@ include ('admin-header.php');
|
|||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap" id="profile-page">
|
||||||
<h2><?php $is_profile_page? _e('Your Profile and Personal Options') : _e('Edit User'); ?></h2>
|
<h2><?php $is_profile_page? _e('Your Profile and Personal Options') : _e('Edit User'); ?></h2>
|
||||||
|
|
||||||
<form name="profile" id="your-profile" action="" method="post">
|
<form name="profile" id="your-profile" action="" method="post">
|
||||||
@ -147,7 +147,11 @@ include ('admin-header.php');
|
|||||||
<h3><?php _e('Personal Options'); ?></h3>
|
<h3><?php _e('Personal Options'); ?></h3>
|
||||||
|
|
||||||
<?php if ( rich_edit_exists() ) : // don't bother showing the option if the editor has been removed ?>
|
<?php if ( rich_edit_exists() ) : // don't bother showing the option if the editor has been removed ?>
|
||||||
<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>
|
<table class="form-table">
|
||||||
|
<tr>
|
||||||
|
<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>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -156,19 +160,19 @@ include ('admin-header.php');
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p class="submit"><input type="submit" value="<?php $is_profile_page? _e('Update Profile') : _e('Update User'); ?>" name="submit" /></p>
|
<h3>Name</h3>
|
||||||
|
|
||||||
<fieldset>
|
<table class="form-table">
|
||||||
<legend><?php _e('Name'); ?></legend>
|
<tr>
|
||||||
<p><label><?php _e('Username: (no editing)'); ?><br />
|
<th><label><?php _e('Username'); ?></label></th>
|
||||||
<input type="text" name="user_login" id="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" />
|
<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>
|
||||||
</label></p>
|
</tr>
|
||||||
|
|
||||||
<?php if ( !$is_profile_page ): ?>
|
<?php if ( !$is_profile_page ): ?>
|
||||||
<p><label><?php _e('Role:') ?><br />
|
<tr><th><label><?php _e('Role:') ?></label></th>
|
||||||
<?php
|
<?php
|
||||||
// print_r($profileuser);
|
// print_r($profileuser);
|
||||||
echo '<select name="role">';
|
echo '<td><select name="role">';
|
||||||
$role_list = '';
|
$role_list = '';
|
||||||
$user_has_role = false;
|
$user_has_role = false;
|
||||||
foreach($wp_roles->role_names as $role => $name) {
|
foreach($wp_roles->role_names as $role => $name) {
|
||||||
@ -185,87 +189,101 @@ if ( $user_has_role )
|
|||||||
$role_list .= '<option value="">' . __('— No role for this blog —') . '</option>';
|
$role_list .= '<option value="">' . __('— No role for this blog —') . '</option>';
|
||||||
else
|
else
|
||||||
$role_list .= '<option value="" selected="selected">' . __('— No role for this blog —') . '</option>';
|
$role_list .= '<option value="" selected="selected">' . __('— No role for this blog —') . '</option>';
|
||||||
echo $role_list . '</select>';
|
echo $role_list . '</select></td></tr>';
|
||||||
?></label></p>
|
?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<p><label><?php _e('First name:') ?><br />
|
<tr>
|
||||||
<input type="text" name="first_name" value="<?php echo $profileuser->first_name ?>" /></label></p>
|
<th><label><?php _e('First name') ?></label></th>
|
||||||
|
<td><input type="text" name="first_name" value="<?php echo $profileuser->first_name ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<p><label><?php _e('Last name:') ?><br />
|
<tr>
|
||||||
<input type="text" name="last_name" value="<?php echo $profileuser->last_name ?>" /></label></p>
|
<th><label><?php _e('Last name') ?></label></th>
|
||||||
|
<td><input type="text" name="last_name" value="<?php echo $profileuser->last_name ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<p><label><?php _e('Nickname:') ?><br />
|
<tr>
|
||||||
<input type="text" name="nickname" value="<?php echo $profileuser->nickname ?>" /></label></p>
|
<th><label><?php _e('Nickname') ?></label></th>
|
||||||
|
<td><input type="text" name="nickname" value="<?php echo $profileuser->nickname ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<p><label><?php _e('Display name publicly as:') ?> <br />
|
<tr>
|
||||||
<select name="display_name">
|
<th><label><?php _e('Display name publicly as') ?> </label></th>
|
||||||
<?php
|
<td>
|
||||||
$public_display = array();
|
<select name="display_name">
|
||||||
$public_display[] = $profileuser->display_name;
|
<?php
|
||||||
$public_display[] = $profileuser->nickname;
|
$public_display = array();
|
||||||
$public_display[] = $profileuser->user_login;
|
$public_display[] = $profileuser->display_name;
|
||||||
$public_display[] = $profileuser->first_name;
|
$public_display[] = $profileuser->nickname;
|
||||||
$public_display[] = $profileuser->first_name.' '.$profileuser->last_name;
|
$public_display[] = $profileuser->user_login;
|
||||||
$public_display[] = $profileuser->last_name.' '.$profileuser->first_name;
|
$public_display[] = $profileuser->first_name;
|
||||||
$public_display = array_unique(array_filter(array_map('trim', $public_display)));
|
$public_display[] = $profileuser->first_name.' '.$profileuser->last_name;
|
||||||
foreach($public_display as $item) {
|
$public_display[] = $profileuser->last_name.' '.$profileuser->first_name;
|
||||||
?>
|
$public_display = array_unique(array_filter(array_map('trim', $public_display)));
|
||||||
<option value="<?php echo $item; ?>"><?php echo $item; ?></option>
|
foreach($public_display as $item) {
|
||||||
<?php
|
?>
|
||||||
}
|
<option value="<?php echo $item; ?>"><?php echo $item; ?></option>
|
||||||
?>
|
<?php
|
||||||
</select></label></p>
|
}
|
||||||
</fieldset>
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<fieldset>
|
<h3>Contact Info</h3>
|
||||||
<legend><?php _e('Contact Info'); ?></legend>
|
|
||||||
|
|
||||||
<p><label><?php _e('E-mail: (required)') ?><br />
|
<table class="form-table">
|
||||||
<input type="text" name="email" value="<?php echo $profileuser->user_email ?>" /></label></p>
|
<tr>
|
||||||
|
<th><label><?php _e('E-mail') ?></label></th>
|
||||||
|
<td><input type="text" name="email" value="<?php echo $profileuser->user_email ?>" /> Required</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<p><label><?php _e('Website:') ?><br />
|
<tr>
|
||||||
<input type="text" name="url" value="<?php echo $profileuser->user_url ?>" />
|
<th><label><?php _e('Website') ?></label></th>
|
||||||
</label></p>
|
<td><input type="text" name="url" value="<?php echo $profileuser->user_url ?>" /></td>
|
||||||
|
</th>
|
||||||
|
|
||||||
<p><label><?php _e('AIM:') ?><br />
|
<tr>
|
||||||
<input type="text" name="aim" value="<?php echo $profileuser->aim ?>" />
|
<th><label><?php _e('AIM') ?></label></th>
|
||||||
</label></p>
|
<td><input type="text" name="aim" value="<?php echo $profileuser->aim ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<p><label><?php _e('Yahoo IM:') ?><br />
|
<tr>
|
||||||
<input type="text" name="yim" value="<?php echo $profileuser->yim ?>" />
|
<th><label><?php _e('Yahoo IM') ?></label></th>
|
||||||
</label></p>
|
<td><input type="text" name="yim" value="<?php echo $profileuser->yim ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<p><label><?php _e('Jabber / Google Talk:') ?><br />
|
<tr>
|
||||||
<input type="text" name="jabber" value="<?php echo $profileuser->jabber ?>" /></label>
|
<th><label><?php _e('Jabber / Google Talk') ?></label></th>
|
||||||
</p>
|
<td><input type="text" name="jabber" value="<?php echo $profileuser->jabber ?>" /></td>
|
||||||
</fieldset>
|
</tr>
|
||||||
<br style="clear: both;" />
|
</table>
|
||||||
<fieldset>
|
|
||||||
<legend><?php $is_profile_page? _e('About Yourself') : _e('About the user'); ?></legend>
|
<h3><?php $is_profile_page? _e('About Yourself') : _e('About the user'); ?></h3>
|
||||||
<p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>
|
|
||||||
<p><textarea name="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea></p>
|
<table class="form-table">
|
||||||
</fieldset>
|
<tr>
|
||||||
|
<th><label>Biographical Info</th>
|
||||||
|
<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>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$show_password_fields = apply_filters('show_password_fields', true);
|
$show_password_fields = apply_filters('show_password_fields', true);
|
||||||
if ( $show_password_fields ) :
|
if ( $show_password_fields ) :
|
||||||
?>
|
?>
|
||||||
<fieldset>
|
<tr>
|
||||||
<legend><?php $is_profile_page? _e('Update Your Password') : _e("Update User's Password"); ?></legend>
|
<th><label><?php _e('New Password:'); ?></label></th>
|
||||||
<p class="desc"><?php _e("If you would like to change the password type a new one twice below. Otherwise leave this blank."); ?></p>
|
<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 />
|
||||||
<p><label><?php _e('New Password:'); ?><br />
|
<input type="password" name="pass2" id="pass2" size="16" value="" /> <?php _e("Type your new password again."); ?><br />
|
||||||
<input type="password" name="pass1" id="pass1" size="16" value="" />
|
<?php if ( $is_profile_page ): ?>
|
||||||
</label></p>
|
<p><strong><?php _e('Password Strength:'); ?></strong></p>
|
||||||
<p><label><?php _e('Type it one more time:'); ?><br />
|
<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.'); ?>
|
||||||
<input type="password" name="pass2" id="pass2" size="16" value="" />
|
<?php endif; ?>
|
||||||
</label></p>
|
</td>
|
||||||
<?php if ( $is_profile_page ): ?>
|
</tr>
|
||||||
<p><strong><?php _e('Password Strength:'); ?></strong></p>
|
</table>
|
||||||
<div id="pass-strength-result"><?php _e('Too short'); ?></div>
|
|
||||||
<p><?php _e('Hint: Use upper and lower case characters, numbers and symbols like !"?$%^&( in your password.'); ?></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
</fieldset>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -298,6 +316,7 @@ if ( $show_password_fields ) :
|
|||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
</table>
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
<input type="hidden" name="action" value="update" />
|
<input type="hidden" name="action" value="update" />
|
||||||
<input type="hidden" name="user_id" id="user_id" value="<?php echo $user_id; ?>" />
|
<input type="hidden" name="user_id" id="user_id" value="<?php echo $user_id; ?>" />
|
||||||
|
@ -795,6 +795,7 @@ html, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-table th {
|
.form-table th {
|
||||||
|
vertical-align: top;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
@ -807,6 +808,27 @@ html, body {
|
|||||||
border-style: solid;
|
border-style: solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#profile-page .form-table input {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#profile-page .form-table textarea {
|
||||||
|
width: 500px;
|
||||||
|
height: 150px;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pass-strength-result {
|
||||||
|
width: 197px;
|
||||||
|
float: left;
|
||||||
|
margin-right: 5px;
|
||||||
|
border: 1px solid #ccc !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#profile-page .form-table #rich_editing {
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Post Screen */
|
/* Post Screen */
|
||||||
|
|
||||||
#tagchecklist {
|
#tagchecklist {
|
||||||
|
Loading…
Reference in New Issue
Block a user