We have a custom implementation to avoid doble submissions which causes
some custom problems 😌
This commit should fix the following three specs
spec/features/comments/legislation_annotations_spec.rb:367
spec/features/comments/legislation_questions_spec.rb:333
spec/features/custom/probe_option_comments_spec.rb:298
One of the custom problems comes from ajax:success[1] not being
triggered, instead only ajax:complete seems to be triggered
We should remove this custom implementation and use the standard
solution provided in rails[2]
[1]
https://github.com/AyuntamientoMadrid/consul/blob/master/app/assets/java
scripts/prevent_double_submission.js.coffee#L28
[2]
https://stackoverflow.com/questions/9570912/how-to-disable-a-form-submit
-button-a-l%C3%A0-ruby-on-rails-way/9572893#9572893
It did not take into account that some forms can have more than 1
submit button, which made the code not include the button values in
some puts and posts.