]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14741: fix onsubmit function - works for forms without previous onsubmit function...
authorscyrma <scyrma>
Wed, 3 Sep 2008 04:07:01 +0000 (04:07 +0000)
committerscyrma <scyrma>
Wed, 3 Sep 2008 04:07:01 +0000 (04:07 +0000)
lib/editor/tinymce.js.php

index d3b7c86360813edef89e4f2dd3bb8142f9dd43e5..d516989bf2192b32e519e09ec1f2f57d5a674913 100644 (file)
@@ -201,7 +201,7 @@ $output .= <<<EOF
         document.getElementById(id).form.onsubmit = function() { 
             tinyMCE.triggerSave(); 
             var ret = true;
-            if (prevOnSubmit()) {
+            if ((prevOnSubmit != undefined) && prevOnSubmit()) {
               ret = true;
               prevOnSubmit = null;
             } else {