diff --git a/application/forms/DirectorDatafieldForm.php b/application/forms/DirectorDatafieldForm.php index 50be4dab..0f86b3c9 100644 --- a/application/forms/DirectorDatafieldForm.php +++ b/application/forms/DirectorDatafieldForm.php @@ -7,6 +7,8 @@ use Icinga\Web\Hook; class DirectorDatafieldForm extends DirectorObjectForm { + protected $objectName = 'Data field'; + public function setup() { $this->addHtmlHint( diff --git a/library/Director/Web/Form/DirectorObjectForm.php b/library/Director/Web/Form/DirectorObjectForm.php index d2bff59a..4f90acaa 100644 --- a/library/Director/Web/Form/DirectorObjectForm.php +++ b/library/Director/Web/Form/DirectorObjectForm.php @@ -12,7 +12,7 @@ abstract class DirectorObjectForm extends QuickForm protected $object; - private $objectName; + protected $objectName; private $className; @@ -321,8 +321,8 @@ abstract class DirectorObjectForm extends QuickForm $msg = sprintf( $object->hasBeenLoadedFromDb() - ? $this->translate('The Icinga %s has successfully been stored') - : $this->translate('A new Icinga %s has successfully been created'), + ? $this->translate('The %s has successfully been stored') + : $this->translate('A new %s has successfully been created'), $this->translate($this->getObjectName()) ); $object->store($this->db);