Selaa lähdekoodia

Yemi - Add support for "onbeforesubmit" callback

Vijayakrishnan 4 vuotta sitten
vanhempi
commit
ecac795f33
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      public/js/yemi.js

+ 5 - 0
public/js/yemi.js

@@ -389,6 +389,11 @@ var initMoes = function() {
                     return;
                 }
 
+                // check and trigger onbeforesubmit
+                if($(form).is('[onbeforesubmit]')) {
+                    window[$(form).attr('onbeforesubmit')].call($(realForm)[0]);
+                }
+
                 // submit
                 moe.isProcessing = true;
                 var data = {};