fix an issue w/ submitting when the dialog is invalid

This fixes a few issues related to submitting a dialog with invalid fields:
- override `onClick` in spark dialog buttons, to ensure that we do not send the onclick event for disabled buttons
- check dialog validity before we submit via a 'trigger on return' field. Before, you could submit a dialog that had a disabled submit button, via hitting return in a 'trigger on return' text field.
- add the ability for spark dialogs to respond to whether it is valid

fixes #2322; @ussuri
Yup, overridden to ensure that the `onClick` event is only sent if the button is enabled, and to consume the click events regardless of the enablement of the button. More details below...