{# .. screenshot:: |canaille|/profile :context: admin :align: right :width: 275px User account creation page. This template displays an account creation form. It is used in the registration page, and in the manual account creation page available for users with *user management* permission. :param form: The user creation form. Dynamically built according to the user :attr:`~canaille.core.configuration.ACLSettings.READ` and :attr:`~canaille.core.configuration.ACLSettings.WRITE` permissions. The available fields are those appearing in *READ* and *WRITE*, those only appearing in *READ* are read-only. :type form: :class:`~flask_wtf.FlaskForm` #} {% extends theme('base.html') %} {% import 'macro/form.html' as fui %} {% import 'core/partial/captcha_field.html' as captcha_field %} {%- block title -%} {%- trans %}User creation{% endtrans -%} {%- endblock -%} {% block script %} {% if captcha_data %} {% endif %} {% endblock %} {% block submenu %} {% if user and user.can_manage_users %} {% trans %}View{% endtrans %} {% trans %}Add{% endtrans %} {% if features.has_smtp %} {% trans %}Invite{% endtrans %} {% endif %} {% endif %} {% endblock %} {% block content %}

{% trans %}User creation{% endtrans %}
{% trans %}Create a new user account{% endtrans %}

{% call fui.render_form(form, class_="profile-form info", hx_boost="false") %}

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

{% if "photo" in form %}
{% block photo_field scoped %} {{ form.photo() }} {{ form.photo_delete() }} {% endblock %}
{% endif %} {% if "given_name" in form or "family_name" in form %}
{% if "given_name" in form %} {% block given_name_field scoped %}{{ form.given_name() }}{% endblock %} {% endif %} {% if "family_name" in form %} {% block family_name_field scoped %}{{ form.family_name() }}{% endblock %} {% endif %}
{% endif %} {% if "display_name" in form %} {% block display_name_field scoped %}{{ form.display_name() }}{% endblock %} {% endif %} {% if "photo" in form %}
{% endif %} {% if "emails" in form %} {% block emails_field scoped %}{{ form.emails() }}{% endblock %} {% endif %} {% if "phone_numbers" in form %} {% block phone_numbers_field scoped %}{{ form.phone_numbers() }}{% endblock %} {% endif %} {% if "formatted_address" in form %} {% block formatted_address_field scoped %}{{ form.formatted_address() }}{% endblock %} {% endif %} {% if "street" in form %} {% block street_field scoped %}{{ form.street() }}{% endblock %} {% endif %}
{% if "postal_code" in form %} {% block postal_code_field scoped %}{{ form.postal_code() }}{% endblock %} {% endif %} {% if "locality" in form %} {% block locality_field scoped %}{{ form.locality() }}{% endblock %} {% endif %} {% if "region" in form %} {% block region_field scoped %}{{ form.region() }}{% endblock %} {% endif %}
{% if "department" in form %} {% block department_field scoped %}{{ form.department() }}{% endblock %} {% endif %} {% if "employee_number" in form %} {% block employee_number_field scoped %}{{ form.employee_number() }}{% endblock %} {% endif %}
{% if "title" in form %} {% block title_field scoped %}{{ form.title() }}{% endblock %} {% endif %} {% if "organization" in form %} {% block organization_field scoped %}{{ form.organization() }}{% endblock %} {% endif %}
{% if "profile_url" in form %} {% block profile_uri_field scoped %}{{ form.profile_url() }}{% endblock %} {% endif %} {% if "preferred_language" in form %} {% block preferred_language_field scoped %}{{ form.preferred_language() }}{% endblock %} {% endif %}

{% trans %}Account settings{% endtrans %}

{% if "user_name" in form %} {% block user_name_field scoped %}{{ form.user_name() }}{% endblock %} {% endif %} {% if "groups" in form %} {% block groups_field scoped %}{{ form.groups() }}{% endblock %} {% endif %} {% if "password1" in form %} {% block password_field scoped %}
{{ form.password1() }} {{ form.password2() }}
{% endblock %} {% endif %} {% if captcha_data %} {{ captcha_field.render_captcha_field(form, captcha_data, 'core.account.captcha_audio') }} {% endif %} {% if user and user.can_manage_users %}
{% trans %}User password is not mandatory{% endtrans %}

{% if features.has_smtp %} {% trans %}The user will not be able to authenticate unless the password is set, but they will be able to ask for a password initialization mail.{% endtrans %} {% else %} {% trans %}The user will not be able to authenticate unless the password is set.{% endtrans %} {% endif %}

{% endif %}
{% if not user %} {{ _("Login page") }} {% endif %} {% call fui.render_button(form.action, "create-profile", class_="ui right floated primary button", id="create-profile") %} {{ _("Submit") }} {% endcall %}
{% endcall %}
{% endblock %}