12 lines
351 B
JavaScript
12 lines
351 B
JavaScript
$(document).ready(function(){
|
|
$('input#user_force_random_password').on('change', function(elem) {
|
|
var elems = $('#user_password, #user_password_confirmation');
|
|
|
|
if ($(this).attr('checked')) {
|
|
elems.val('').attr('disabled', true);
|
|
} else {
|
|
elems.removeAttr('disabled');
|
|
}
|
|
});
|
|
});
|