Ticket #33699: 33699.diff
File 33699.diff, 1.2 KB (added by , 9 years ago) |
---|
-
src/wp-admin/js/user-profile.js
195 195 } 196 196 } ); 197 197 198 // Disable the hidden inputs to prevent autofill and submission. 199 $pass1.prop( 'disabled', true ); 200 $pass2.prop( 'disabled', true ); 201 $pass1Text.prop( 'disabled', true ) 202 198 203 $passwordWrapper = $pass1Row.find( '.wp-pwd' ); 199 204 $generateButton = $pass1Row.find( 'button.wp-generate-pw' ); 200 205 … … 211 216 $generateButton.hide(); 212 217 $passwordWrapper.show(); 213 218 219 // Enable the inputs when showing. 220 $pass1.attr( 'disabled', false ); 221 $pass2.attr( 'disabled', false ); 222 $pass1Text.attr( 'disabled', false ) 223 214 224 if ( $pass1Text.val().length === 0 ) { 215 225 generatePassword(); 216 226 } … … 239 249 $generateButton.show(); 240 250 $passwordWrapper.hide(); 241 251 252 // Disable the inputs when hiding to prevent autofill and submission. 253 $pass1.prop( 'disabled', true ); 254 $pass2.prop( 'disabled', true ); 255 $pass1Text.prop( 'disabled', true ) 256 242 257 resetToggle(); 243 258 244 259 // Clear password field to prevent update