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 class DirectorDatafieldForm extends DirectorObjectForm
{ {
protected $objectName = 'Data field';
public function setup() public function setup()
{ {
$this->addHtmlHint( $this->addHtmlHint(

View File

@ -12,7 +12,7 @@ abstract class DirectorObjectForm extends QuickForm
protected $object; protected $object;
private $objectName; protected $objectName;
private $className; private $className;
@ -321,8 +321,8 @@ abstract class DirectorObjectForm extends QuickForm
$msg = sprintf( $msg = sprintf(
$object->hasBeenLoadedFromDb() $object->hasBeenLoadedFromDb()
? $this->translate('The Icinga %s has successfully been stored') ? $this->translate('The %s has successfully been stored')
: $this->translate('A new Icinga %s has successfully been created'), : $this->translate('A new %s has successfully been created'),
$this->translate($this->getObjectName()) $this->translate($this->getObjectName())
); );
$object->store($this->db); $object->store($this->db);