diff --git a/lam/HISTORY b/lam/HISTORY index c18a030b..fa88b0a2 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -1,3 +1,9 @@ +December 2013 4.4 + - allow to set a custom label for each account type + - LAM Pro: + -> Samba/Shadow: display password change date in self service + + 25.09.2013 4.3 - Custom SSL CA certificates can be setup in LAM main configuration - Unix user and group support for Samba 4 diff --git a/lam/docs/manual-sources/howto.xml b/lam/docs/manual-sources/howto.xml index f9f1e22f..cfb1c92d 100644 --- a/lam/docs/manual-sources/howto.xml +++ b/lam/docs/manual-sources/howto.xml @@ -1297,6 +1297,13 @@ Have fun! users. + + Custom label: Here you + can set a custom label for the account types. Use this if the + standard label does not fit for you (e.g. enter "Servers" for + hosts). + + No new entries (LAM Pro only): Use this if you want to prevent that new @@ -5554,7 +5561,7 @@ Run slapindex to rebuild the index. - + @@ -5587,6 +5594,26 @@ Run slapindex to rebuild the index. with Unix. + + Last password change (read-only) + + Displays the date and time of the user's last password + change. + + + + + + + + Shadow + + Last password change (read-only) + + Displays the date and time of the user's last password + change (Unix). + + diff --git a/lam/docs/manual-sources/images/configTypes2.png b/lam/docs/manual-sources/images/configTypes2.png index d607ffdc..69735f24 100644 Binary files a/lam/docs/manual-sources/images/configTypes2.png and b/lam/docs/manual-sources/images/configTypes2.png differ diff --git a/lam/help/help.inc b/lam/help/help.inc index 863e8787..411c0879 100644 --- a/lam/help/help.inc +++ b/lam/help/help.inc @@ -161,6 +161,8 @@ $helpArray = array ( "Text" => _('If checked then the user will not be able to create new entries of this account type.')), "263" => array ("Headline" => _("Disallow delete"), "Text" => _('If checked then the user will not be able to delete entries of this account type.')), + "264" => array ("Headline" => _('Custom label'), + "Text" => _('Here you can overwrite the display name for this account type.')), // 300 - 399 // profile editor, file upload "301" => array ("Headline" => _("RDN identifier"), diff --git a/lam/lib/types.inc b/lam/lib/types.inc index 16581824..e935150a 100644 --- a/lam/lib/types.inc +++ b/lam/lib/types.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2005 - 2006 Roland Gruber + Copyright (C) 2005 - 2013 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -73,6 +73,12 @@ function getTypes() { * @return string type alias */ function getTypeAlias($type) { + if (!empty($_SESSION['config'])) { + $typeSettings = $_SESSION['config']->get_typeSettings(); + if (!empty($typeSettings['customLabel_' . $type])) { + return $typeSettings['customLabel_' . $type]; + } + } $obj = new $type(); return $obj->getAlias(); } diff --git a/lam/templates/config/conftypes.php b/lam/templates/config/conftypes.php index 263297eb..1d0a321b 100644 --- a/lam/templates/config/conftypes.php +++ b/lam/templates/config/conftypes.php @@ -281,6 +281,15 @@ if (sizeof($activeTypes) > 0) { $hidden = $typeSettings['hidden_' . $activeTypes[$i]]; } $advancedOptionsContent->addElement(new htmlTableExtendedInputCheckbox('hidden_' . $activeTypes[$i], $hidden, _('Hidden'), '261'), true); + // custom label + $customLabel = ''; + if (isset($typeSettings['customLabel_' . $activeTypes[$i]])) { + $customLabel = $typeSettings['customLabel_' . $activeTypes[$i]]; + } + $customLabelInput = new htmlTableExtendedInputField(_('Custom label'), 'customLabel_' . $activeTypes[$i], $customLabel, '264'); + $customLabelInput->setFieldSize(40); + $advancedOptionsContent->addElement($customLabelInput); + $advancedOptionsContent->addElement(new htmlSpacer('20px', null)); if (isLAMProVersion() && ($conf->getAccessLevel() == LAMConfig::ACCESS_ALL)) { // hide button to create new accounts $hideNewButton = false; @@ -375,7 +384,11 @@ function checkInput() { } } // set filter - elseif (substr($key, 0, 7) == "filter_") { + elseif (substr($key, 0, strlen('filter_')) == "filter_") { + $typeSettings[$key] = $_POST[$key]; + } + // set custom label + elseif (strpos($key, 'customLabel_') === 0) { $typeSettings[$key] = $_POST[$key]; } }