MDL-11318 formslib now respects a template for an element if it is set. But since formslib uses the templates to insert help buttons for setAdvanced functionality etc. if you use templates you will lose this functionality.

This commit is contained in:
jamiesensei 2007-09-18 09:35:44 +00:00
parent d13d30ef78
commit 41b6d0011c

View File

@ -1602,8 +1602,9 @@ class MoodleQuickForm_Renderer extends HTML_QuickForm_Renderer_Tableless{
$html = str_replace('{help}', '', $html);
}
$this->_templates[$element->getName()] = $html;
if (!isset($this->_templates[$element->getName()])) {
$this->_templates[$element->getName()] = $html;
}
parent::renderElement($element, $required, $error);
}