Changeset 16456 for trunk/wp-admin/user-new.php
- Timestamp:
- 11/18/2010 05:38:53 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/user-new.php
r16455 r16456 216 216 echo '<h3 id="add-existing-user">' . __('Add Existing User') . '</h3>'; 217 217 if ( !is_super_admin() ) { 218 _e( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' );218 _e( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); 219 219 $label = __('E-mail'); 220 220 } else { 221 _e( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' );221 _e( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); 222 222 $label = __('E-mail or Username'); 223 223 } 224 224 ?> 225 <form action=" " method="post" name="adduser" id="adduser" class="add:users: validate"<?php do_action('user_new_form_tag');?>>225 <form action="#add-existing-user" method="post" name="adduser" id="adduser" class="add:users: validate"<?php do_action('user_new_form_tag');?>> 226 226 <input name="action" type="hidden" id="action" value="adduser" /> 227 227 <?php wp_nonce_field('add-user') ?> … … 229 229 <tr class="form-field form-required"> 230 230 <th scope="row"><label for="email"><?php echo $label; ?></label></th> 231 <td><input name="email" type="text" id="email" value=" " /></td>231 <td><input name="email" type="text" id="email" value="<?php echo esc_attr($new_user_email); ?>" /></td> 232 232 </tr> 233 233 <tr class="form-field"> 234 234 <th scope="row"><label for="role"><?php _e('Role'); ?></label></th> 235 235 <td><select name="role" id="role"> 236 <?php wp_dropdown_roles( get_option('default_role') ); ?> 236 <?php 237 if ( !$new_user_role ) 238 $new_user_role = !empty($current_role) ? $current_role : get_option('default_role'); 239 wp_dropdown_roles($new_user_role); 240 ?> 237 241 </select> 238 242 </td> … … 252 256 if ( current_user_can( 'create_users') ) { 253 257 if ( $do_both ) 254 echo '<h3 id="create-new-user">' . __( 'Create New User') . '</h3>';258 echo '<h3 id="create-new-user">' . __('Create New User') . '</h3>'; 255 259 ?> 256 260 <p><?php _e('Create a brand new user and add it to this site.'); ?></p> 257 <form action=" " method="post" name="createuser" id="adduser" class="add:users: validate"<?php do_action('user_new_form_tag');?>>261 <form action="#create-new-user" method="post" name="createuser" id="adduser" class="add:users: validate"<?php do_action('user_new_form_tag');?>> 258 262 <input name="action" type="hidden" id="action" value="createuser" /> 259 263 <?php wp_nonce_field('create-user') ?> 260 264 <?php 261 265 // Load up the passed data, else set to a default. 262 foreach ( array( 263 'email' => 'email', 'url' => 'uri', 'role' => 'role' , 'send_password' => 'send_password', 'noconfirmation' => 'ignore_pass') as $post_field => $var ) {266 foreach ( array('user_login' => 'login', 'first_name' => 'firstname', 'last_name' => 'lastname', 267 'email' => 'email', 'url' => 'uri', 'role' => 'role') as $post_field => $var ) { 264 268 $var = "new_user_$var"; 265 if( isset( $_POST['createuser'] ) ) { 266 if ( ! isset($$var) ) 267 $$var = isset( $_POST[$post_field] ) ? stripslashes( $_POST[$post_field] ) : ''; 268 } else { 269 $$var = false; 270 } 269 if ( ! isset($$var) ) 270 $$var = isset($_POST[$post_field]) ? stripslashes($_POST[$post_field]) : ''; 271 271 } 272 272 $new_user_send_password = !$_POST || isset($_POST['send_password']); 273 273 ?> 274 274 <table class="form-table"> … … 307 307 <tr> 308 308 <th scope="row"><label for="send_password"><?php _e('Send Password?') ?></label></th> 309 <td><label for="send_password"><input type="checkbox" name="send_password" id="send_password" <?php checked( $new_user_send_password); ?> /> <?php _e('Send this password to the new user by email.'); ?></label></td>309 <td><label for="send_password"><input type="checkbox" name="send_password" id="send_password" <?php checked($new_user_send_password, true); ?> /> <?php _e('Send this password to the new user by email.'); ?></label></td> 310 310 </tr> 311 311 <?php endif; ?> … … 325 325 <tr> 326 326 <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th> 327 <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?>/> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td>327 <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" /> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td> 328 328 </tr> 329 329 <?php } ?>
Note: See TracChangeset
for help on using the changeset viewer.