]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8039 formslib Form id collission with body id when editing course, user details...
authorskodak <skodak>
Sat, 6 Jan 2007 20:31:06 +0000 (20:31 +0000)
committerskodak <skodak>
Sat, 6 Jan 2007 20:31:06 +0000 (20:31 +0000)
lib/formslib.php

index f93c04c29a388a37fae7f2db57d5a2c2306d8d33..46a7b2e0528b11b215db2f074c13b6c2cebdc158 100644 (file)
@@ -109,8 +109,7 @@ class moodleform {
             $action = strip_querystring(qualified_me());
         }
 
-        //strip '_form' from the end of class name to make form name attribute.
-        $this->_formname = preg_replace('/_form$/', '', get_class($this), 1);
+        $this->_formname = get_class($this); // '_form' suffix kept in order to prevent collisions of form id and other element
         $this->_customdata = $customdata;
         $this->_form =& new MoodleQuickForm($this->_formname, $method, $action, $target, $attributes);
         $this->set_upload_manager(new upload_manager());