diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:47 +0000 |
commit | 5419d4428c86c488a43124f85e5407d7cbae6541 (patch) | |
tree | 772c4221a20fd7d1b3e7e67c6e21755a50e80fd7 /application/forms/DirectorDatafieldForm.php | |
parent | Adding upstream version 1.10.2. (diff) | |
download | icingaweb2-module-director-upstream.tar.xz icingaweb2-module-director-upstream.zip |
Adding upstream version 1.11.1.upstream/1.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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( |