Add textbox functionality to Icinga\Form\SendCommand

This commit is contained in:
Johannes Meyer 2013-07-08 15:45:09 +02:00 committed by Marius Hein
parent 23f19da02b
commit 23e15e3f54
1 changed files with 14 additions and 0 deletions

View File

@ -97,6 +97,20 @@ class SendCommand extends Builder
{
return $this->getValue($id);
}
public function addTextBox($id, $label, $value = "", $readonly = false, $multiline = false)
{
$options = array('label' => $label, 'value' => $value);
if ($readonly) {
$options['readonly'] = 1;
}
$this->addElement($multiline ? "textarea" : "text", $id, $options);
}
public function getText($id)
{
return $this->getValue($id);
}
}
?>