QuickForm: addHtml VS addHtmlNote (note is styled)

This commit is contained in:
Thomas Gelf 2015-07-31 14:48:17 +02:00
parent 24f7e36e92
commit 51672e33bd

View File

@ -177,11 +177,16 @@ abstract class QuickForm extends Zend_Form
}
public function addHtmlHint($html, $options = array())
{
return $this->addHtml('<div class="hint">' . $html . '</div>', $options);
}
public function addHtml($html, $options = array())
{
$name = '_HINT' . ++$this->hintCount;
$this->addElement('note', $name, $options);
$this->getElement($name)
->setValue('<div class="hint">' . $html . '</div>')
->setValue($html)
->setIgnore(true)
->removeDecorator('Label');