From 61f6bae374239446a6c99c8831ee263626abc9dc Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 16 Mar 2016 12:31:23 +0100 Subject: [PATCH] IcingaUserForm: add display_name fixes #11395 --- application/forms/IcingaUserForm.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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(