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];
}
}
|