use window.csrftoken for adding user to group subscription

This commit is contained in:
Henry Oswald 2014-03-03 17:58:26 +00:00
parent a0805f97e0
commit 07fe9c36a9

View file

@ -39,7 +39,7 @@ require [
type: 'POST'
data:
email: email
_csrf: $("input[name=_csrf]").val()
_csrf: csrfToken
success: (data)->
if data.limitReached
alert("You have reached your maximum number of members")
@ -69,8 +69,6 @@ require [
success: ->
$(userRow).parents("tr").fadeOut(250)
$form.on 'keypress', (e)->
if(e.keyCode == 13)
addUser(e)