Only enable form controls when the form is valid (bug 873474)