]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/user-new.php
Wordpress 2.8.4
[autoinstalls/wordpress.git] / wp-admin / user-new.php
index 0c98ad8dcf67cad9ef26122fc9eb764219c69fc1..9d143253b6b18b3477ce5bf93ea7af16b8a557aa 100644 (file)
@@ -36,7 +36,9 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
 $title = __('Add New User');
 $parent_file = 'users.php';
 
-wp_enqueue_script('admin-users');
+wp_enqueue_script('wp-ajax-response');
+wp_enqueue_script('user-profile');
+wp_enqueue_script('password-strength-meter');
 
 require_once ('admin-header.php');
 
@@ -87,35 +89,45 @@ foreach ( array('user_login' => 'login', 'first_name' => 'firstname', 'last_name
        if ( ! isset($$var) )
                $$var = isset($_POST[$post_field]) ? stripslashes($_POST[$post_field]) : '';
 }
+$new_user_send_password = !$_POST || isset($_POST['send_password']);
 ?>
 <table class="form-table">
        <tr class="form-field form-required">
-               <th scope="row"><label for="user_login"><?php _e('Username (required)') ?></label><input name="action" type="hidden" id="action" value="adduser" /></th>
-               <td ><input name="user_login" type="text" id="user_login" value="<?php echo $new_user_login; ?>" aria-required="true" /></td>
+               <th scope="row"><label for="user_login"><?php _e('Username'); ?> <span class="description"><?php _e('(required)'); ?></span></label>
+               <input name="action" type="hidden" id="action" value="adduser" /></th>
+               <td><input name="user_login" type="text" id="user_login" value="<?php echo esc_attr($new_user_login); ?>" aria-required="true" /></td>
        </tr>
        <tr class="form-field">
                <th scope="row"><label for="first_name"><?php _e('First Name') ?> </label></th>
-               <td><input name="first_name" type="text" id="first_name" value="<?php echo $new_user_firstname; ?>" /></td>
+               <td><input name="first_name" type="text" id="first_name" value="<?php echo esc_attr($new_user_firstname); ?>" /></td>
        </tr>
        <tr class="form-field">
                <th scope="row"><label for="last_name"><?php _e('Last Name') ?> </label></th>
-               <td><input name="last_name" type="text" id="last_name" value="<?php echo $new_user_lastname; ?>" /></td>
+               <td><input name="last_name" type="text" id="last_name" value="<?php echo esc_attr($new_user_lastname); ?>" /></td>
        </tr>
        <tr class="form-field form-required">
-               <th scope="row"><label for="email"><?php _e('E-mail (required)') ?></label></th>
-               <td><input name="email" type="text" id="email" value="<?php echo $new_user_email; ?>" /></td>
+               <th scope="row"><label for="email"><?php _e('E-mail'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
+               <td><input name="email" type="text" id="email" value="<?php echo esc_attr($new_user_email); ?>" /></td>
        </tr>
        <tr class="form-field">
                <th scope="row"><label for="url"><?php _e('Website') ?></label></th>
-               <td><input name="url" type="text" id="url" value="<?php echo $new_user_uri; ?>" /></td>
+               <td><input name="url" type="text" id="url" class="code" value="<?php echo esc_attr($new_user_uri); ?>" /></td>
        </tr>
 
 <?php if ( apply_filters('show_password_fields', true) ) : ?>
        <tr class="form-field form-required">
-               <th scope="row"><label for="pass1"><?php _e('Password (twice)') ?> </label></th>
+               <th scope="row"><label for="pass1"><?php _e('Password'); ?> <span class="description"><?php _e('(twice, required)'); ?></span></label></th>
                <td><input name="pass1" type="password" id="pass1" autocomplete="off" />
                <br />
-               <input name="pass2" type="password" id="pass2" autocomplete="off"/></td>
+               <input name="pass2" type="password" id="pass2" autocomplete="off" />
+               <br />
+               <div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
+               <p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).'); ?></p>
+               </td>
+       </tr>
+       <tr>
+               <th scope="row"><label for="send_password"><?php _e('Send Password?') ?></label></th>
+               <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>
        </tr>
 <?php endif; ?>
 
@@ -132,12 +144,11 @@ foreach ( array('user_login' => 'login', 'first_name' => 'firstname', 'last_name
        </tr>
 </table>
 <p class="submit">
-       <input name="adduser" type="submit" id="addusersub" class="button-primary" value="<?php _e('Add User') ?>" />
+       <input name="adduser" type="submit" id="addusersub" class="button-primary" value="<?php esc_attr_e('Add User') ?>" />
 </p>
 </form>
 
 </div>
-
 <?php
 include('admin-footer.php');
-?>
\ No newline at end of file
+?>