You use CoffeeScript to do something like these lines:
jQuery ->
$('.theform').submit ->
$('input:submit').attr("disabled", true)
This disables the form submit button when the form with class="theform" is submitted. Depending on your need you adjust this to fit with your class/id for the form.