diff options
Diffstat (limited to 'application/forms/DirectorDatafieldForm.php')
-rw-r--r-- | application/forms/DirectorDatafieldForm.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/application/forms/DirectorDatafieldForm.php b/application/forms/DirectorDatafieldForm.php index a306bd7..ab0dcd8 100644 --- a/application/forms/DirectorDatafieldForm.php +++ b/application/forms/DirectorDatafieldForm.php @@ -140,8 +140,7 @@ class DirectorDatafieldForm extends DirectorObjectForm $this->addElement('text', 'varname', array( 'label' => $this->translate('Field name'), 'description' => $this->translate( - 'The unique name of the field. This will be the name of the custom' - . ' variable in the rendered Icinga configuration.' + 'This will be the name of the custom variable in the rendered Icinga configuration.' ), 'required' => true, )); @@ -166,7 +165,7 @@ class DirectorDatafieldForm extends DirectorObjectForm $this->addElement('select', 'category_id', [ 'label' => $this->translate('Data Field Category'), - 'multiOptions' => $this->optionalEnum($this->enumCategpories()), + 'multiOptions' => $this->optionalEnum($this->enumCategories()), ]); $error = false; @@ -282,7 +281,7 @@ class DirectorDatafieldForm extends DirectorObjectForm protected function enumDataTypes() { $hooks = Hook::all('Director\\DataType'); - $enum = array(null => '- please choose -'); + $enum = [null => $this->translate('- please choose -')]; /** @var DataTypeHook $hook */ foreach ($hooks as $hook) { $enum[get_class($hook)] = $hook->getName(); @@ -291,7 +290,7 @@ class DirectorDatafieldForm extends DirectorObjectForm return $enum; } - protected function enumCategpories() + protected function enumCategories() { $db = $this->getDb()->getDbAdapter(); return $db->fetchPairs( |