{% extends theme('base.html') %} {% import 'fomanticui.html' as sui %} {% block script %} {% endblock %} {% macro render_field(field, noindicator=false) %} {% set lock_indicator = field.render_kw and ("readonly" in field.render_kw or "disabled" in field.render_kw) %} {% if not edited_user %} {{ sui.render_field(field, **kwargs) }} {% elif edited_user.uid == user.uid or lock_indicator or noindicator %} {{ sui.render_field(field, **kwargs) }} {% elif field.name in edited_user.write %} {{ sui.render_field(field, **kwargs) }} {% elif field.name in edited_user.read %} {{ sui.render_field(field, indicator_icon="eye", indicator_text=_("This user cannot edit this field"), **kwargs) }} {% else %} {{ sui.render_field(field, indicator_icon="eye slash", indicator_text=_("This user cannot see this field"), **kwargs) }} {% endif %} {% endmacro %} {% block content %} {% if self_deletion or (user.can_manage_users and edited_user) %} {% endif %}

{% if not edited_user %} {% trans %}User creation{% endtrans %} {% elif user.uid == edited_user.uid %} {% trans %}My profile{% endtrans %} {% else %} {% trans %}User profile edition{% endtrans %} {% endif %}
{% if not edited_user %} {% trans %}Create a new user account{% endtrans %} {% elif user.uid == edited_user.uid %} {% trans %}Edit your personal information{% endtrans %} {% else %} {% trans %}Edit information about a user{% endtrans %} {% endif %}

{#{ render_field(form.csrf_token) }#}

{% trans %}Personal information{% endtrans %}

{% if "jpegPhoto" in form %}
{% block photo_field scoped %} {{ render_field(form.jpegPhoto, display=false, class="photo-field") }} {{ render_field(form.jpegPhoto_delete, display=false, class="photo-delete-button") }} {% set photo = edited_user.jpegPhoto and edited_user.jpegPhoto[0] %}
{% endblock %}
{% endif %}
{% if "givenName" in form %} {% block given_name_field scoped %}{{ render_field(form.givenName) }}{% endblock %} {% endif %} {% if "sn" in form %} {% block sn_field scoped %}{{ render_field(form.sn) }}{% endblock %} {% endif %}
{% if "displayName" in form %} {% block display_name_field scoped %}{{ render_field(form.displayName) }}{% endblock %} {% endif %} {% if "jpegPhoto" in form %}
{% endif %} {% if "mail" in form %} {% block mail_field scoped %}{{ render_field(form.mail) }}{% endblock %} {% endif %} {% if "telephoneNumber" in form %} {% block telephone_number_field scoped %}{{ render_field(form.telephoneNumber) }}{% endblock %} {% endif %} {% if "postalAddress" in form %} {% block postal_address_field scoped %}{{ render_field(form.postalAddress) }}{% endblock %} {% endif %} {% if "employeeNumber" in form %} {% block employee_number_field scoped %}{{ render_field(form.employeeNumber) }}{% endblock %} {% endif %} {% if "labeledURI" in form %} {% block labeled_uri_field scoped %}{{ render_field(form.labeledURI) }}{% endblock %} {% endif %} {% if "preferredLanguage" in form %} {% block preferred_language_field scoped %}{{ render_field(form.preferredLanguage) }}{% endblock %} {% endif %}

{% trans %}Account information{% endtrans %}

{% if "uid" in form %} {% block uid_field scoped %}{{ render_field(form.uid) }}{% endblock %} {% endif %} {% if "groups" in form %} {% block groups_field scoped %}{{ render_field(form.groups) }}{% endblock %} {% endif %} {% if "password1" in form %} {% block password_field scoped %}
{{ render_field(form.password1, noindicator=true) }} {{ render_field(form.password2, noindicator=true) }}
{% endblock %} {% endif %} {% if user.can_manage_users %} {% if not edited_user %}
{% trans %}User password is not mandatory{% endtrans %}
{% if has_password %}

{% trans %}The user password can be set:{% endtrans %}

  • {% trans %}by filling this form;{% endtrans %}
  • {% trans %}by sending the user a password initialization mail, after the account creation;{% endtrans %}
  • {% trans %}or simply waiting for the user to sign-in a first time, and then receive a password initialization mail.{% endtrans %}
{% else %}

{% trans %}The user will not be able to authenticate unless the password is set{% endtrans %}

{% endif %}
{% elif not edited_user.has_password() %}
{% if has_smtp and edited_user.can_edit_self %} {% endif %}
{% trans %}This user does not have a password yet{% endtrans %}
{% if has_smtp and edited_user.can_edit_self %}

{% trans %}You can solve this by:{% endtrans %}

  • {% trans %}setting a password using this form;{% endtrans %}
  • {% trans %}sending the user a password initialization mail, by clicking this button;{% endtrans %}
  • {% trans %}or simply waiting for the user to sign-in a first time, and then receive a password initialization mail.{% endtrans %}
{% else %}

{% trans %}The user will not be able to authenticate unless the password is set{% endtrans %}

{% endif %}
{% elif has_smtp and edited_user.uid != user.uid and edited_user.has_password() and edited_user.can_edit_self %}
{% trans %}Password reset{% endtrans %}

{% trans %}If the user has forgotten his password, you can send him a password reset email by clicking this button.{% endtrans %}

{% endif %} {% endif %}
{% if user.can_manage_users and edited_user or self_deletion %} {% endif %} {% if user.can_impersonate_users and edited_user and user.uid != edited_user.uid %} {{ _("Impersonate") }} {% endif %} {% if user.can_manage_users and not edited_user and has_smtp %} {{ _("Invite a user") }} {% endif %}
{% endblock %}