|
|
@@ -123,10 +123,9 @@
|
|
|
// The custom submit handler
|
|
|
// It will prevent the form from the default submission
|
|
|
//
|
|
|
- // submitHandler: function(validator, form, submitButton) {
|
|
|
+ // submitHandler: function(validator, form) {
|
|
|
// - validator is the BootstrapValidator instance
|
|
|
// - form is the jQuery object presenting the current form
|
|
|
- // - submitButton is the jQuery object presenting the clicked button
|
|
|
// }
|
|
|
submitHandler: null,
|
|
|
|
|
|
@@ -549,7 +548,7 @@
|
|
|
// Call the custom submission if enabled
|
|
|
if (this.options.submitHandler && 'function' == typeof this.options.submitHandler) {
|
|
|
// If you want to submit the form inside your submit handler, please call defaultSubmit() method
|
|
|
- this.options.submitHandler.call(this, this, this.$form, this.$submitButton);
|
|
|
+ this.options.submitHandler.call(this, this, this.$form);
|
|
|
} else {
|
|
|
this.disableSubmitButtons(true).defaultSubmit();
|
|
|
}
|
|
|
@@ -1016,6 +1015,15 @@
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
+ * Returns the clicked submit button
|
|
|
+ *
|
|
|
+ * @returns {jQuery}
|
|
|
+ */
|
|
|
+ getSubmitButton: function() {
|
|
|
+ return this.$submitButton;
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
* Get the error messages
|
|
|
*
|
|
|
* @param {String|jQuery} [field] The field name or field element
|