Commits

Zhang Huangbin committed 635b91b

Sync.

Comments (0)

Files changed (3)

controllers/ldap/admin.py

 from web import render
 from controllers.ldap import base
 from controllers.ldap.core import dbinit
-from libs.ldaplib import admin
+from libs.ldaplib import admin, preferences
 
 session = web.config.get('_session')
 
 adminLib = admin.Admin()
+prefLib = preferences.Preferences()
 
 #
 # Admin related.
     @base.check_global_admin
     @base.protected
     def GET(self):
-        return render.add()
+        return render.admin_add()

templates/default/ldap/domain_profile.html

 {% from "macros.html" import
         display_cn,
         display_account_status,
-        display_domain_backup_mx,
-        display_all_admins,
         %}
 
 {% block js_tablesorter %}{% endblock %}
             </div>
         </div>
 
-        {{ display_cn(cn) }}
-
-        {% if session.get('domainGlobalAdmin') == 'yes' %}
-            {{ display_account_status(accountStatus) }}
-
-            {{ display_all_admins(admins=admins, domainAdmins=domainAdmins) }}
-
-            {{ display_domain_backup_mx(domainBackupMX) }}
-
+        {% if profile_type == 'general' %}
+            {{ display_cn(cn) }}
+            {% if session.get('domainGlobalAdmin') == 'yes' %}
+                {{ display_account_status(accountStatus) }}
+            {% endif %}
         {% endif %}
 
         <div class="frm-buttons">

templates/default/ldap/preferences.html

 
 {% block main %}
 <div class="main-subhead">
-    <h2 class="hn"><span>{{ _('View/Update your preferences (%s).') |format(session.get('username')) }}</span></h2>
+    <h2 class="hn"><span>
+            {% if admin == session.get('username') or admin is not defined %}
+            {{ _('View/Update your preferences.') }}
+            {% else %}
+            {{ _("View/Update %s's preferences.") |format(admin) }}
+            {% endif %}
+    </span></h2>
 </div>
 
 {% if msg is not none %}
 
         <fieldset class="sf-set">
             <legend><span>{{ _('Default language') }}</span></legend>
-            <div class="mf-box select">
+            <div class="sf-box select">
                 <label><span>{{ _('Default language') }}</span></label>
                 <select name="preferredLanguage">
                     {% for lang in langmaps %}