parent
cc49a289a2
commit
660540ee1a
|
@ -163,6 +163,19 @@ class TransportConfigForm extends ConfigForm
|
||||||
*/
|
*/
|
||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
|
$this->addElement(
|
||||||
|
'text',
|
||||||
|
'instance',
|
||||||
|
array(
|
||||||
|
'placeholder' => 'default',
|
||||||
|
'label' => $this->translate('Instance Name'),
|
||||||
|
'description' => $this->translate(
|
||||||
|
'The name of the Icinga instance this transport should transfer commands to. You do not '
|
||||||
|
. 'need to adjust this if you\'re not using a different instance name than the default.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'text',
|
'text',
|
||||||
'name',
|
'name',
|
||||||
|
|
|
@ -22,6 +22,7 @@ class TransportPage extends Form
|
||||||
$transportConfigForm = new TransportConfigForm();
|
$transportConfigForm = new TransportConfigForm();
|
||||||
$this->addSubForm($transportConfigForm, 'transport_form');
|
$this->addSubForm($transportConfigForm, 'transport_form');
|
||||||
$transportConfigForm->create($formData);
|
$transportConfigForm->create($formData);
|
||||||
|
$transportConfigForm->removeElement('instance');
|
||||||
$transportConfigForm->getElement('name')->setValue('icinga2');
|
$transportConfigForm->getElement('name')->setValue('icinga2');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue