DirectorObjectForm: fix overrideable object name

This commit is contained in:
Thomas Gelf 2015-07-31 15:51:07 +02:00
parent c4c9980075
commit e97f3c946a
2 changed files with 5 additions and 3 deletions

View File

@ -7,6 +7,8 @@ use Icinga\Web\Hook;
class DirectorDatafieldForm extends DirectorObjectForm
{
protected $objectName = 'Data field';
public function setup()
{
$this->addHtmlHint(

View File

@ -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);