mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
DirectorDatafieldForm: fix typo, translate
This commit is contained in:
parent
71b311e258
commit
62f59d4c5a
@ -165,7 +165,7 @@ class DirectorDatafieldForm extends DirectorObjectForm
|
|||||||
|
|
||||||
$this->addElement('select', 'category_id', [
|
$this->addElement('select', 'category_id', [
|
||||||
'label' => $this->translate('Data Field Category'),
|
'label' => $this->translate('Data Field Category'),
|
||||||
'multiOptions' => $this->optionalEnum($this->enumCategpories()),
|
'multiOptions' => $this->optionalEnum($this->enumCategories()),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$error = false;
|
$error = false;
|
||||||
@ -281,7 +281,7 @@ class DirectorDatafieldForm extends DirectorObjectForm
|
|||||||
protected function enumDataTypes()
|
protected function enumDataTypes()
|
||||||
{
|
{
|
||||||
$hooks = Hook::all('Director\\DataType');
|
$hooks = Hook::all('Director\\DataType');
|
||||||
$enum = array(null => '- please choose -');
|
$enum = [null => $this->translate('- please choose -')];
|
||||||
/** @var DataTypeHook $hook */
|
/** @var DataTypeHook $hook */
|
||||||
foreach ($hooks as $hook) {
|
foreach ($hooks as $hook) {
|
||||||
$enum[get_class($hook)] = $hook->getName();
|
$enum[get_class($hook)] = $hook->getName();
|
||||||
@ -290,7 +290,7 @@ class DirectorDatafieldForm extends DirectorObjectForm
|
|||||||
return $enum;
|
return $enum;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function enumCategpories()
|
protected function enumCategories()
|
||||||
{
|
{
|
||||||
$db = $this->getDb()->getDbAdapter();
|
$db = $this->getDb()->getDbAdapter();
|
||||||
return $db->fetchPairs(
|
return $db->fetchPairs(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user