Add choice functionality to Icinga\Form\SendCommand
This commit is contained in:
parent
101a1f093f
commit
087e4dfe90
|
@ -111,6 +111,20 @@ class SendCommand extends Builder
|
||||||
{
|
{
|
||||||
return $this->getValue($id);
|
return $this->getValue($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addChoice($id, $label, $values)
|
||||||
|
{
|
||||||
|
$this->addElement("select", $id, array(
|
||||||
|
'label' => $label
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$this->getElement($id)->setMultiOptions($values);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getChoice($id)
|
||||||
|
{
|
||||||
|
return $this->getElement($id)->options[$_POST[$id]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue