Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Artificially triggering onsubmit event on CMS form buttons rath…

…er than calling submitForm() method, in order to give forms like .cms-add-form the option to overload its behaviour
  • Loading branch information...
commit 72985b6f42d51844c0bed63a14bad00b18a6a76c 1 parent f97804b
Ingo Schommer chillu authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 admin/javascript/LeftAndMain.EditForm.js
6 admin/javascript/LeftAndMain.EditForm.js
View
@@ -141,8 +141,8 @@
*
* Suppress submission unless it is handled through ajaxSubmit().
*/
- onsubmit: function(e) {
- this.parents('.cms-content').submitForm(this);
+ onsubmit: function(e, button) {
+ this.parents('.cms-content').submitForm(this, button);
return false;
},
@@ -179,7 +179,7 @@
* Function: onclick
*/
onclick: function(e) {
- $('.cms-content').submitForm(this.parents('form'), this);
+ this.parents('form').trigger('submit', [this]);
e.preventDefault();
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.