The ERROR event is defined as being fired if an exception occurs while
contacting the server. This change ensures it is fired for exceptions
in the form definition AJAX request, not just form submission.
Additionally, if such an error occurs in submission, the form buttons
were left in disabled state. This change makes them enabled again.