]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14591 Changed element's 2nd param (elementLabel) to class name(s). Defaults to...
authornicolasconnault <nicolasconnault>
Tue, 2 Sep 2008 12:23:38 +0000 (12:23 +0000)
committernicolasconnault <nicolasconnault>
Tue, 2 Sep 2008 12:23:38 +0000 (12:23 +0000)
lib/form/warning.php

index 125ad647127242d30702648a1ffe7ae57e2c0110..1492912affe6a32d31ffaa1c7d470b05bbfd4c48 100644 (file)
@@ -15,10 +15,12 @@ class MoodleQuickForm_warning extends HTML_QuickForm_static{
      * @var string
      */
     var $_helpbutton='';
+    var $_class='';
 
-    function MoodleQuickForm_warning($elementName=null, $elementLabel=null, $text=null) {
-        parent::HTML_QuickForm_static($elementName, $elementLabel, $text);
+    function MoodleQuickForm_warning($elementName=null, $elementClass='formwarning', $text=null) {
+        parent::HTML_QuickForm_static($elementName, null, $text);
         $this->_type = 'warning';
+        $this->_class = $elementClass;
     }
 
     /**
@@ -44,7 +46,7 @@ class MoodleQuickForm_warning extends HTML_QuickForm_static{
     }
 
     function toHtml() {
-        return notify($this->_text, 'formwarning', 'center', true);
+        return notify($this->_text, $this->_class, 'center', true);
     }
 
     /**