From 90355eaa3d889ec2f24d5c230041276d2da6592c Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Tue, 2 Sep 2008 12:23:38 +0000 Subject: [PATCH] MDL-14591 Changed element's 2nd param (elementLabel) to class name(s). Defaults to .formwarning --- lib/form/warning.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/form/warning.php b/lib/form/warning.php index 125ad64712..1492912aff 100644 --- a/lib/form/warning.php +++ b/lib/form/warning.php @@ -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); } /** -- 2.39.5