Added option to automaticaly generate passwords for new users.

This commit is contained in:
Jakub Troszok 2012-06-26 23:59:08 +02:00
parent bea0583951
commit 4426bc1844
4 changed files with 47 additions and 12 deletions

View file

@ -0,0 +1,11 @@
$(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');
}
});
});