diff --git a/lib/form/warning.php b/lib/form/warning.php index 1492912affe..aea35cc1eec 100644 --- a/lib/form/warning.php +++ b/lib/form/warning.php @@ -20,6 +20,9 @@ class MoodleQuickForm_warning extends HTML_QuickForm_static{ function MoodleQuickForm_warning($elementName=null, $elementClass='formwarning', $text=null) { parent::HTML_QuickForm_static($elementName, null, $text); $this->_type = 'warning'; + if (is_null($elementClass)) { + $elementClass = 'formwarning'; + } $this->_class = $elementClass; }