{% extends "layout.html" %} {% from "macros/form_inputs.html" import input_submit, input_csrf_token with context %} {% from "macros/general.html" import display_subnav, display_input_cn, display_preferred_language, display_timezones, display_quota, display_input_employeeid, display_account_status, display_reset_password, display_random_password, with context %} {% from "macros/msg_handlers.html" import warning_info, user_msg_handler with context %} {% block title %}{{ _('Edit account profile') }}{% endblock %} {% block navlinks_domains %}class="active"{% endblock %} {% block breadcrumb %} {% set crumbs = [ (ctx.homepath + '/domains', _('All domains')), (ctx.homepath + '/profile/domain/general/' + cur_domain, cur_domain), (ctx.homepath + '/users/' + cur_domain, _('Users')), ('active', ctx.homepath + '/profile/user/general/' + mail, _('Profile of user:') + ' ' + mail), ] %} {{ display_subnav(crumbs) }} {% endblock %} {% block main %} {# Show system message #} {% if msg %} {% if msg.startswith('PW_') %} {% set _pw_errors = msg.split(',') %} {% for _err in _pw_errors %} {{ user_msg_handler(_err) }} {% endfor %} {% else %} {{ user_msg_handler(msg) }} {% endif %} {% endif %} {% if discarded_aliases %} {% set _msg = _('Some addresses have been discarded because they have been used: %s.') |format(discarded_aliases | join(', ')) %} {{ warning_info(msg=_msg, removable=true) }} {% endif %} {% set navlinks = [ ('general', _('General'), [true]), ('password', _('Password'), [true]), ] %}
    {% for nav in navlinks %} {% if not false in nav[2] and not none in nav[2] %}
  • {{ nav[1] }}
  • {% endif %} {% endfor %}

{{ _('Profile of user:') }} {{ mail }}

{{ input_csrf_token() }}
{{ display_account_status(profile.active) }}
{{ display_input_cn(value=profile.name, email=mail, empty_if_equal_to_username=true) }} {% set stored_mailbox_size = used_quota.get(mail, {}).get('bytes', 0) %} {% set stored_mailbox_messages = used_quota.get(mail, {}).get('messages', 0) %} {{ display_quota(value=profile.quota, show_value_in_input=true, used_quota=stored_mailbox_size, stored_messages=stored_mailbox_messages, show_used_quota=true) }} {{ display_preferred_language(value=profile.get('language'), languagemaps=languagemaps) }} {{ display_timezones(value=user_settings.get('timezone'), timezones=timezones) }}
{{ display_input_employeeid(profile.employeeid) }}
{#-- .col2-3 --#}
{#-- .columns --#} {{ input_submit() }}
{# #profile_general #} {# Password #}
{{ input_csrf_token() }}
{{ display_reset_password(show_confirmpw=true, min_passwd_length=min_passwd_length, max_passwd_length=max_passwd_length, store_password_in_plain_text=store_password_in_plain_text) }}
{{ display_random_password(password_length=min_passwd_length, password_policies=password_policies, password_last_change_date=profile.passwordlastchange) }}
{{ input_submit() }}
{% endblock main %} {% block extra_js %} {% endblock extra_js %}