Added reference to event on the .on method('ajax:success',...

This commit is contained in:
Manuel Ortega
2017-10-20 14:12:31 +02:00
parent 3daf957813
commit 9de9a81b8c

View File

@@ -25,7 +25,7 @@ App.PreventDoubleSubmission =
unless event.target.id == "new_officing_voter"
buttons = $(this).find(':button, :submit')
App.PreventDoubleSubmission.disable_buttons(buttons)
).on('ajax:success', ->
).on('ajax:success', (event) ->
unless event.target.id == "new_officing_voter"
buttons = $(this).find(':button, :submit')
App.PreventDoubleSubmission.reset_buttons(buttons)