Add textbox functionality to Icinga\Form\SendCommand
This commit is contained in:
parent
23f19da02b
commit
23e15e3f54
|
@ -97,6 +97,20 @@ class SendCommand extends Builder
|
||||||
{
|
{
|
||||||
return $this->getValue($id);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue