does not use custom implementation to disable submit button

This commit is contained in:
rgarcia
2017-10-13 12:40:42 +02:00
parent 1d59dcac7c
commit 560ff7c51d
2 changed files with 9 additions and 5 deletions

View File

@@ -22,11 +22,13 @@ App.PreventDoubleSubmission =
initialize: ->
$('form').on('submit', (event) ->
buttons = $(this).find(':button, :submit')
App.PreventDoubleSubmission.disable_buttons(buttons)
unless event.target.id == "new_officing_voter"
buttons = $(this).find(':button, :submit')
App.PreventDoubleSubmission.disable_buttons(buttons)
).on('ajax:success', ->
buttons = $(this).find(':button, :submit')
App.PreventDoubleSubmission.reset_buttons(buttons)
unless event.target.id == "new_officing_voter"
buttons = $(this).find(':button, :submit')
App.PreventDoubleSubmission.reset_buttons(buttons)
)
false