DirectorObjectForm: fix overrideable object name
This commit is contained in:
parent
c4c9980075
commit
e97f3c946a
|
@ -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(
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue