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