diff --git a/application/forms/IcingaUserForm.php b/application/forms/IcingaUserForm.php index b8d0749c..a1bf479f 100644 --- a/application/forms/IcingaUserForm.php +++ b/application/forms/IcingaUserForm.php @@ -39,6 +39,7 @@ class IcingaUserForm extends DirectorObjectForm $this->addGroupsElement() ->addImportsElement() + ->addDisplayNameElement() ->addEnableNotificationsElement() ->addDisabledElement() ->addEventFilterElements() @@ -79,6 +80,23 @@ class IcingaUserForm extends DirectorObjectForm return $this; } + protected function addDisplayNameElement() + { + if ($this->isTemplate()) { + return $this; + } + + $this->addElement('text', 'display_name', array( + 'label' => $this->translate('Display name'), + 'description' => $this->translate( + 'Alternative name for this user. In case your object name is a' + . ' username, this could be the full name of the corresponding person' + ) + )); + + return $this; + } + protected function groupObjectDefinition() { $elements = array(