Ticket #8296: 8296-1.diff
File 8296-1.diff, 1.7 KB (added by , 12 years ago) |
---|
-
wp-admin/js/user-profile.dev.js
73 73 }); 74 74 }); 75 75 } 76 // auto-generate password 77 $("#auto_generate_password").click( function() { 78 var length = 12; 79 var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()'; 80 var password = ''; 81 82 for ( var i = 0; i < length; i++ ) { 83 start = Math.floor(Math.random()*chars.length); 84 password = password + chars.substring(start - 1, start); 85 } 86 87 $("#pass1, #pass2").val(password); 88 check_pass_strength(); 89 }); 76 90 }); 77 91 78 92 })(jQuery); -
wp-admin/user-new.php
342 342 <?php if ( apply_filters('show_password_fields', true) ) : ?> 343 343 <tr class="form-field form-required"> 344 344 <th scope="row"><label for="pass1"><?php _e('Password'); ?> <span class="description"><?php /* translators: password input field */_e('(twice, required)'); ?></span></label></th> 345 <td><input name="pass1" type="password" id="pass1" autocomplete="off" /> 345 <td><input name="pass1" type="password" id="pass1" autocomplete="off" /> <span class="hide-if-no-js"><input class="button-secondary" type="button" id="auto_generate_password" value="Generate random password" /> <img class="ajax-loading" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ) ?>" /></span> 346 346 <br /> 347 347 <input name="pass2" type="password" id="pass2" autocomplete="off" /> 348 348 <br />