In one month (iRedMail, iRedAPD, iRedAdmin-Pro). Below is patch for iRedAdmin-Pro-LDAP-1.8.1 if you want to give it a try. WARNING: Please backup files which are going to be patched before applying patch.
diff -r 68511236e5d3 -r dc949701c440 libs/ldaplib/attrs.py
--- a/libs/ldaplib/attrs.py Fri Jan 04 22:30:15 2013 +0800
+++ b/libs/ldaplib/attrs.py Sat Jan 05 15:39:52 2013 +0800
@@ -49,7 +49,7 @@
'domainGlobalAdmin', 'enabledService',
'objectClass',
]
-ADMIN_ATTRS_ALL = ADMIN_SEARCH_ATTRS
+ADMIN_ATTRS_ALL = ADMIN_SEARCH_ATTRS + ['sn', 'givenName']
# ---------------------------------------------------------
# Domain related.
@@ -114,6 +114,7 @@
]
USER_ATTRS_ALL = USER_SEARCH_ATTRS + [
+ 'sn', 'givenName',
'mobile', 'telephoneNumber', 'preferredLanguage', 'memberOfGroup',
'userRecipientBccAddress', 'userSenderBccAddress',
'mailForwardingAddress', 'mtaTransport',
diff -r 68511236e5d3 -r dc949701c440 templates/default/ldap/admin/profile.html
--- a/templates/default/ldap/admin/profile.html Fri Jan 04 22:30:15 2013 +0800
+++ b/templates/default/ldap/admin/profile.html Sat Jan 05 15:39:52 2013 +0800
@@ -25,8 +25,11 @@
{% set entry = profile[0][1] %}
{% set cn = entry.get('cn', [''])[0].decode('utf-8') %}
+{% set first_name = entry.get('givenName', [''])[0].decode('utf-8') |e %}
+{% set last_name = entry.get('sn', [''])[0].decode('utf-8') |e %}
{% set accountStatus = entry.get('accountStatus', ['disabled'])[0] %}
+
{% block breadcrumb %}
{% set crumbs = [
(ctx.homepath + '/admins', _('All admins'),),
@@ -66,7 +69,11 @@
<div class="bt-space0"> </div>
{% endif %}
- {{ display_input_cn(cn=cn, accountType='admin') }}
+ {{ display_input_cn(cn,
+ tooltip=_('Full name'),
+ show_first_last_name=true,
+ first_name=first_name,
+ last_name=last_name) }}
{{ display_preferred_language(value=entry.get('preferredLanguage', ['en_US'])[0], languagemaps=languagemaps) }}
</div>
diff -r 68511236e5d3 -r dc949701c440 templates/default/ldap/user/profile.html
--- a/templates/default/ldap/user/profile.html Fri Jan 04 22:30:15 2013 +0800
+++ b/templates/default/ldap/user/profile.html Sat Jan 05 15:39:52 2013 +0800
@@ -60,13 +60,14 @@
{% endif %}
{% if profile_type == 'general' %}
+ {% set first_name = entries.get('givenName', [''])[0].decode('utf-8') |e %}
+ {% set last_name = entries.get('sn', [''])[0].decode('utf-8') |e %}
{% set jobtitle = entries.get('title', [''])[0].decode('utf-8') |e %}
{% set mobile = entries.get('mobile', [''])[0] |e %}
{% set telephoneNumber = entries.get('telephoneNumber', []) %}
{% set mailQuota = '%d' % (entries.get('mailQuota', [0])[0] |int /1024/1024) %}
{% set usedQuota = accountUsedQuota.get(mail, {}).get('bytes', 0) %}
- {#-- Member of Groups --#}
{% set memberOfGroup = entries.get('memberOfGroup', []) %}
{% elif profile_type == 'forwarding' %}
@@ -155,7 +156,11 @@
{{ display_in_global_address_book(enabledService=enabledService) }}
<div class="bt-space10"></div>
- {{ display_input_cn(cn) }}
+ {{ display_input_cn(cn,
+ tooltip=_('Full name'),
+ show_first_last_name=true,
+ first_name=first_name,
+ last_name=last_name) }}
{{ display_preferred_language(value=entries.get('preferredLanguage', ['en_US'])[0], languagemaps=languagemaps) }}
{{ display_quota(value=mailQuota, show_value_in_input=true, used_quota=usedQuota, show_used_quota=true) }}
diff -r 68511236e5d3 -r dc949701c440 templates/default/macros/general.html
--- a/templates/default/macros/general.html Fri Jan 04 22:30:15 2013 +0800
+++ b/templates/default/macros/general.html Sat Jan 05 15:39:52 2013 +0800
@@ -81,7 +81,7 @@
});
{# tooltip #}
- $("a[title], img[title], span[title]").tooltip({
+ $("a[title], img[title], span[title], input[title]").tooltip({
position: "top center",
offset: [-5, 0],
predelay: 300,
@@ -90,14 +90,6 @@
opacity: 1
});
- $("input[title]").tooltip({
- position: "center right",
- offset: [-2, 10],
- delay: 100,
- effect: "fade",
- opacity: 1
- });
-
{% if 'tablesorter' in plugins %}
$(".tablesorter").tablesorter(
{% if nonSortedCols |length > 0 %}
@@ -631,7 +623,7 @@
{%- endmacro %}
-{% macro display_input_cn(cn='', name='cn', accountType='user', tooltip='', size="size-250") -%}
+{% macro display_input_cn(cn='', name='cn', accountType='user', tooltip='', size="size-250", show_first_last_name=false, first_name='', last_name='') -%}
{% if cn is sameas none %}
{% set cn = '' %}
{% endif %}
@@ -647,6 +639,16 @@
<input type="text" name="{{ name |e }}" value="{{ cn |e }}" size="35" class="text" {% if tooltip != '' %}title="{{ tooltip |e }}"{% endif %} />
</span>
</div>
+
+ {% if show_first_last_name is sameas true %}
+ <div class="form-field clear">
+ <h4 class="size-250 fl-space"> </h4>
+ <span class="clean-padding bt-space20">
+ <input type="text" name="first_name" value="{{ first_name |e }}" size="15" class="text" title="{{ _('First name') }}" />
+ <input type="text" name="last_name" value="{{ last_name |e }}" size="15" class="text" title="{{ _('Last name') }}"/>
+ </span>
+ </div>
+ {% endif %}
{%- endmacro %}