Added option to automaticaly generate passwords for new users.
This commit is contained in:
parent
bea0583951
commit
4426bc1844
4 changed files with 47 additions and 12 deletions
11
app/assets/javascripts/admin.js
Normal file
11
app/assets/javascripts/admin.js
Normal 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');
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue