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

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

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

{% block js %}{% endblock js %}
{% block js_tablesorter %}{% endblock js_tablesorter %}
{% block jquery_docoment_ready %}{% endblock jquery_docoment_ready %}

{% 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 %}
            {# Catch-all #}
            <div class="error">{{msg}}</div>
        {% 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 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>
                        <span>
                            <select id="domainSelect" name="domainName" onchange="changeDomain(this, baseurl='{{ctx.homepath}}/profile/domain/{{profile_type}}/');">
                                {% 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>{{ set_account_status_img(accountStatus) }}</span>
                    </li>
                    <li><span><strong>{{ _('Company/Organization') }}</strong> {% if cn != 'None' %}{{cn}}{% endif %}</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' %}
        {% if session.get('domainGlobalAdmin') == 'yes' %}
            {{ display_account_status(accountStatus, accountType='domain', firstitem='yes',) }}
        {% endif %}

        {{ display_cn(cn, accountType='domain') }}
    {% endif %}

    <div class="frm-buttons">
        <span class="submit"><input type="submit" name="save" value="{{ _('Save changes') }}" /></span>
    </div>
</div>
</form>
{% endblock main %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.