Source

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

Full commit
{# defined: mail, cur_lang, langmaps, [msg], #}

{% extends "layout.html" %}

{% block js_tablesorter %}{% endblock %}

{% block title %}{{ _('Preferences') }}{% endblock %}

{% block id_welcome %}
<span><a href="{{ctx.homepath}}/profile/admin/general/{{mail}}" {% if profile_type == 'general' %}class="active"{%endif%}>{{ _('General') }}</a>&nbsp;</span>
<span><a href="{{ctx.homepath}}/profile/admin/password/{{mail}}" {% if profile_type == 'password' %}class="active"{%endif%}>{{ _('Reset password') }}</a>&nbsp;</span>
{% endblock id_welcome %}

{% if session.get('domainGlobalAdmin') == 'yes' %}
    {% block id_visit_links %}
        <span><a href="{{ctx.homepath}}/admins">{{ _('Back to admin list') }}</a></span>
    {% endblock id_visit_links %}
{% endif %}

{% block main %}

{# Show 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 %}
        <div class="error">{{ msg }}</div>
    {% endif %}
    </div>
{% endif %}

<form class="frm-form" method="post" action="{{ctx.homepath}}/profile/admin/{{profile_type}}/{{mail}}">
{% if profile_type == 'general' %}
    <div class="main-frm">
        <fieldset class="sf-set">
            <legend><span>{{ _('Default language') }}</span></legend>
            <div class="sf-box select">
                <label><span>{{ _('Default language') }}</span></label>
                <span class="fld-input">
                    <select name="preferredLanguage">
                        {% for lang in langmaps %}
                            <option value="{{lang}}" {% if lang == cur_lang %}selected{%endif%}>{{langmaps[lang]}}</option>
                        {% endfor %}
                    </select>
                </span>
            </div>
        </fieldset>
    </div>
{% endif %}

{% if profile_type == 'password' %}
    <div class="main-frm">
        <div class="sf-set">
            <div class="sf-box text">
                <label><span>{{ _('Current password') }}</span></label><br />
                <span class="fld-input"><input type="password" id="cur_passwd" name="cur_passwd" size="25" /></span>
            </div>

            <div class="sf-box text">
                <label><span>{{ _('New password') }}</span></label><br />
                <span class="fld-input"><input type="password" name="newpw" size="25" /></span>
            </div>

            <div class="sf-box text">
                <label><span>{{ _('Retype new password') }}</span></label><br />
                <span class="fld-input"><input type="password" name="confirmpw" size="25" /></span>
            </div>
        </div>
    </div>
{% endif %}

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