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
|
||||
{
|
||||
protected $objectName = 'Data field';
|
||||
|
||||
public function setup()
|
||||
{
|
||||
$this->addHtmlHint(
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue