TransportConfigForm: Add `instance' form field

refs #9651
This commit is contained in:
Johannes Meyer 2015-08-27 16:33:10 +02:00
parent cc49a289a2
commit 660540ee1a
2 changed files with 14 additions and 0 deletions

View File

@ -163,6 +163,19 @@ class TransportConfigForm extends ConfigForm
*/
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(
'text',
'name',

View File

@ -22,6 +22,7 @@ class TransportPage extends Form
$transportConfigForm = new TransportConfigForm();
$this->addSubForm($transportConfigForm, 'transport_form');
$transportConfigForm->create($formData);
$transportConfigForm->removeElement('instance');
$transportConfigForm->getElement('name')->setValue('icinga2');
}