{#- Inviting people from a spreadsheet, step 2: what will happen to each address. Those already members are left alone; the others are added, each with a role, or taken off the list: those with an account as they are, those without one with an account made for them, named as the spreadsheet names them, or by themselves when they arrive. -#} {% extends "ads_community.html" %} {% set invite_page = true %} {% import "community/_wizard.html" as wizard with context %} {% block page_title %}{{ _("Invite members") }} ยท {{ g.community.name }}{% endblock %} {% block content %} {% call wizard.frame(2, _("Who joins")) %}
{% if existing_members_objects %}

{{ _("Already members: nothing to do") }}

{% endif %}

{{ _("They have an account: they will be added") }}

{% for user in existing_accounts_object %} {% endfor %}
{{ _("Name") }}{{ _("Role") }}{{ _("Remove") }}
{{ m.avatar(user, "ads-avatar--xs") }}{{ user.name }}{{ user.email }} {{ wizard.role_select(user.email, {"data-wizard-role": user.email}, csv_roles[user.email.lower()] if csv_roles else "member") }} {{ wizard.remove_button(user.email, {"data-wizard-remove": user.email}) }}
{{ _("There is no existing accounts") }}

{{ _("No account: one will be made, and an invitation sent") }}

{% for account in new_accounts %} {% set name = [account.first_name, account.last_name] | select | join(" ") %} {% endfor %}
{{ _("Name") }}{{ _("Role") }}{{ _("Remove") }}
{% if name %}{{ name }}{{ account.email }}{% else %}{{ account.email }}{% endif %} {{ wizard.role_select(account.email, {"data-wizard-role": account.email}, account.role) }} {{ wizard.remove_button(account.email, {"data-wizard-remove": account.email}) }}
{{ _("Nobody without an account") }}
{{ _("Cancel") }}
{% endcall %} {% endblock %}