rewrite admin.js in coffeescript
This commit is contained in:
parent
c106bb7096
commit
60e18e2636
2 changed files with 8 additions and 11 deletions
8
app/assets/javascripts/admin.js.coffee
Normal file
8
app/assets/javascripts/admin.js.coffee
Normal file
|
@ -0,0 +1,8 @@
|
|||
$ ->
|
||||
$('input#user_force_random_password').on 'change', (elem) ->
|
||||
elems = $('#user_password, #user_password_confirmation')
|
||||
|
||||
if $(@).attr 'checked'
|
||||
elems.val('').attr 'disabled', true
|
||||
else
|
||||
elems.removeAttr 'disabled'
|
Loading…
Add table
Add a link
Reference in a new issue