]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed javascript for cases where htmleditor is not available.
authorvyshane <vyshane>
Mon, 27 Mar 2006 03:02:26 +0000 (03:02 +0000)
committervyshane <vyshane>
Mon, 27 Mar 2006 03:02:26 +0000 (03:02 +0000)
mod/data/templates.php

index 34dc1d68ac29438f7f9cfc6907b8e833ec4b3f76..56dc23a596790da8df4d4eeb457faed1fb4a02f6 100755 (executable)
@@ -75,7 +75,7 @@
     // For the javascript for inserting template tags: initialise the default textarea to
     // 'edit_template' - it is always present in all different possible views.
     $bodytag = 'onload="';
-    $bodytag .= 'currEditor = edit_template; ';
+    $bodytag .= 'if (typeof(currEditor) != \'undefined\') { currEditor = edit_template; } ';
     $bodytag .= 'currTextarea = document.tempform.template;';
     $bodytag .= '" ';