mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
QuickForm: addHtmlHint helper method
This commit is contained in:
parent
9d9c23eed6
commit
c9dd2e284c
@ -62,6 +62,8 @@ abstract class QuickForm extends Zend_Form
|
|||||||
|
|
||||||
protected $icingaModuleName;
|
protected $icingaModuleName;
|
||||||
|
|
||||||
|
protected $hintCount = 0;
|
||||||
|
|
||||||
public function __construct($options = null)
|
public function __construct($options = null)
|
||||||
{
|
{
|
||||||
if ($options !== null && array_key_exists('icingaModule', $options)) {
|
if ($options !== null && array_key_exists('icingaModule', $options)) {
|
||||||
@ -162,6 +164,18 @@ abstract class QuickForm extends Zend_Form
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addHtmlHint($html, $options = array())
|
||||||
|
{
|
||||||
|
$name = '_HINT' . ++$this->hintCount;
|
||||||
|
$this->addElement('note', $name, $options);
|
||||||
|
$this->getElement($name)
|
||||||
|
->setValue('<div class="hint">' . $html . '</div>')
|
||||||
|
->setIgnore(true)
|
||||||
|
->removeDecorator('Label');
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function optionalEnum($enum)
|
public function optionalEnum($enum)
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user