{% extends theme('base.html') %} {% import 'macro/form.html' as fui %} {%- block title -%} {%- trans %}Invite a user{% endtrans -%} {%- endblock -%} {% block script %} {% endblock %} {% block submenu %} {% endblock %} {% block content %}
{% if form_validated %}

{% if request.form["action"] == "generate" %} {{ _("Invitation link") }} {% elif email_sent %} {{ _("Invitation sent") }} {% else %} {{ _("Invitation not sent") }} {% endif %}

{% if request.form["action"] == "generate" %}
{% trans %}Here is the invitation link you can provide to the user you want to invite:{% endtrans %}
{% elif email_sent %}
{% set email = form.email.data %} {% trans %}This invitation link has been sent to {{ email }}{% endtrans %} {% trans %}If you need to provide this link by other ways than email, you can copy it there:{% endtrans %}
{% else %}
{% set email = form.email.data %} {% trans %}This invitation link could not be sent to {{ email }} due to technical issues.{% endtrans %} {% trans %}However you can copy the link there to provide it by other ways than email:{% endtrans %}
{% endif %}

{{ _("Create a user") }} {% if request.form["action"] == "generate" or email_sent %} {{ _("Invite another user") }} {% endif %}
{% else %}

{{ _("Invite a user") }}

{% trans %} After this form is sent, the recipient your indicated will receive an email containing an account creation link. {% endtrans %}
{% call fui.render_form(form) %} {% block user_name_field scoped %} {{ fui.render_field(form.user_name, icon="user") }} {% endblock %} {% block user_name_editable_field scoped %} {{ fui.render_checkbox(form.user_name_editable) }} {% endblock %} {% block email_field scoped %} {{ fui.render_field(form.email, icon="email") }} {% endblock %} {% block groups_field scoped %} {{ fui.render_field(form.groups, icon="users") }} {% endblock %}
{{ _("Create a user") }}
{% endcall %}
{% endif %}
{% endblock %}