diff --git a/application/forms/IcingaCommandForm.php b/application/forms/IcingaCommandForm.php index 8cfdeb4f..eacc747d 100644 --- a/application/forms/IcingaCommandForm.php +++ b/application/forms/IcingaCommandForm.php @@ -43,8 +43,12 @@ class IcingaCommandForm extends DirectorObjectForm 'class' => 'autosubmit' )); + $nameLabel = $this->isTemplate() + ? $this->translate('Name') + : $this->translate('Command name'); + $this->addElement('text', 'object_name', array( - 'label' => $this->translate('Command name'), + 'label' => $nameLabel, 'required' => true, 'description' => $this->translate('Identifier for the Icinga command you are going to create') )); diff --git a/application/forms/IcingaHostForm.php b/application/forms/IcingaHostForm.php index b611195c..7b68ffa3 100644 --- a/application/forms/IcingaHostForm.php +++ b/application/forms/IcingaHostForm.php @@ -34,8 +34,12 @@ class IcingaHostForm extends DirectorObjectForm } } + $nameLabel = $this->isTemplate() + ? $this->translate('Name') + : $this->translate('Hostname'); + $this->addElement('text', 'object_name', array( - 'label' => $this->translate('Hostname'), + 'label' => $nameLabel, 'required' => true, 'spellcheck' => 'false', 'description' => $this->translate(