We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 67ad654 + 631cd2b commit 2cd9d80Copy full SHA for 2cd9d80
bootstrap_modal_forms/static/js/jquery.bootstrap.modal.forms.js
@@ -21,6 +21,14 @@ https://github.com/trco/django-bootstrap-modal-forms
21
$(settings.submitBtn).on("click", function (event) {
22
isFormValid(settings, submitForm);
23
});
24
+ // Support submition on form fields
25
+ $(settings.modalForm).on("submit", function (event) {
26
+ if (event.originalEvent !== undefined) {
27
+ event.preventDefault();
28
+ isFormValid(settings, submitForm);
29
+ return false;
30
+ }
31
+ });
32
// Modal close handler
33
$(settings.modalID).on("hidden.bs.modal", function (event) {
34
$(settings.modalForm).remove();
@@ -175,4 +183,4 @@ https://github.com/trco/django-bootstrap-modal-forms
175
183
return this;
176
184
};
177
185
178
-}(jQuery));
186
+}(jQuery));
0 commit comments