Source

iredadmin-ose / templates / default / ldap / domain_profile.html

Full commit
{# cur_domain, allDomains, profile_type, #}
{% extends "layout.html" %}

{% from "macros.html" import
        display_cn,
        display_account_status,
        %}

{% block js_tablesorter %}{% endblock %}

{% block title %}{{ _('Edit domain profile.') }}{% endblock %}

{% block id_welcome %}
<span><a href="{{ctx.homepath}}/profile/domain/general/{{cur_domain}}" {% if profile_type == "general" %}class="active"{%endif%}>General</a>&nbsp;</span>
{% endblock id_welcome %}

{% block id_visit_links %}
<span><a href="{{ctx.homepath}}/users/{{cur_domain}}">{{ _('Users') }}</a></span>
{% endblock id_visit_links %}

{# Domain profile. #}
{% block main %}

{# message #}
{% if msg is defined and msg is not sameas none %}
    <div class="ct-box info-box">
        {% if msg == 'SUCCESS' %}
        <div class="success">
            {{ _('Profile update success.') }}
        </div>
        {% else %}
            {# Password #}
            {% if profile_type == 'password' %}
            <div class="error">
                {{msg}}
            </div>
            {% else %}
            {# Catch-all #}
            <div class="error">
                {{ msg }}
            </div>
            {% endif %}
        {% endif %}
    </div>
{% endif %}

{% set p = profile[0] %}
{% set dn = p[0] %}
{% set entries = p[1] %}
{% set domainName = entries.get('domainName')[0] %}
{% set cn = entries.get('cn', [''])[0].decode('utf-8') %}
{% set accountStatus = entries.get('accountStatus', ['disabled'])[0] %}
{% set domainAdmin = entries.get('domainAdmin', ['']) %}
{% set domainBackupMX = entries.get('domainBackupMX', ['no'])[0] %}

{% set createTimestamp = entries.get('createTimestamp', ['--------------'])[0] %}

<form class="frm-form" method="post" action="{{ctx.homepath}}/profile/domain/{{profile_type}}/{{cur_domain}}">
<div class="main-frm">
    <div class="profile ct-group data-group vcard">
        <div class="ct-set data-set set1">
            <div class="ct-box data-box">
                <ul class="data-list">
                    <input type="hidden" name="domainName" value="{{cur_domain}}" />
                    <li><span><strong>{{ _('Domain name:') }}</strong>
                        <span>
                            <select id="domainSelect" name="domainName" onchange="listAccountsUnderDomain(this, baseurl='{{ctx.homepath}}/profile/domain/general/');">
                                {% for d in allDomains %}
                                <option value="{{d[1].domainName[0]}}" {% if cur_domain == d[1].domainName[0] %}selected{%endif%}>{{d[1].domainName[0]}}</option>
                                {% endfor %}
                                </select>
                            </span></span></li>
                    <li><span><strong>{{ _('Company/Organization:') }}</strong> {{cn}}</span></li>
                    <li><span><strong>{{ _('Created Date:') }}</strong> {{createTimestamp[:4]}}-{{createTimestamp[4:6]}}-{{createTimestamp[6:8]}} {{createTimestamp[8:10]}}:{{createTimestamp[10:12]}}:{{createTimestamp[12:14]}}</span></li>
                    </ul>
                </div>
            </div>
        </div>

        {% if profile_type == 'general' %}
            {{ display_cn(cn) }}
            {% if session.get('domainGlobalAdmin') == 'yes' %}
                {{ display_account_status(accountStatus) }}
            {% endif %}
        {% endif %}

        <div class="frm-buttons">
            <span class="submit"><input type="submit" name="save" value="{{ _('Save changes') }}" /></span>
        </div>
</div>
</form>
{% endblock main %}