diff --git a/application/forms/BpConfigForm.php b/application/forms/BpConfigForm.php index 531cf0f..64e5350 100644 --- a/application/forms/BpConfigForm.php +++ b/application/forms/BpConfigForm.php @@ -51,16 +51,18 @@ class BpConfigForm extends BpConfigBaseForm 'rows' => 4, )); - $this->addElement('select', 'Backend', array( - 'label' => $this->translate('Backend'), - 'description' => $this->translate( - 'Icinga Web Monitoring Backend where current object states for' - . ' this process should be retrieved from' - ), - 'multiOptions' => array( - null => $this->translate('Use the configured default backend'), - ) + $this->listAvailableBackends() - )); + if (! empty($this->listAvailableBackends())) { + $this->addElement('select', 'Backend', array( + 'label' => $this->translate('Backend'), + 'description' => $this->translate( + 'Icinga Web Monitoring Backend where current object states for' + . ' this process should be retrieved from' + ), + 'multiOptions' => array( + null => $this->translate('Use the configured default backend'), + ) + $this->listAvailableBackends() + )); + } $this->addElement('select', 'Statetype', array( 'label' => $this->translate('State Type'),