{% extends 'layouts/base.html' %} {% load i18n %} {% block title %}{{ page_title }} - PX360{% endblock %} {% block content %}

{% trans "Bulk Invite Users" %}

{% trans "Invite multiple users at once using a CSV file" %}

{% trans "Back to Users" %}
{% trans "Upload CSV File" %}
{% csrf_token %}
{% trans "Upload a CSV file with the required columns. Maximum 500 users per upload." %}
{% trans "CSV Format Requirements" %}

{% trans "Your CSV file must include these columns:" %}

  • email - {% trans "User's email address (required)" %}
  • first_name - {% trans "First name (required)" %}
  • last_name - {% trans "Last name (required)" %}
  • role - {% trans "Role name, e.g., 'Staff', 'Physician' (required)" %}
  • hospital_id - {% trans "Hospital UUID (required)" %}
  • department_id - {% trans "Department UUID (optional)" %}

{% trans "Download Template CSV" %}

{% trans "Cancel" %}
{% if results.total > 0 %}
{% trans "Import Results" %}

{{ results.total }}

{% trans "Total Processed" %}

{{ results.success|length }}

{% trans "Successfully Invited" %}

{{ results.errors|length }}

{% trans "Failed" %}
{% if results.success %}
{% trans "Successfully Invited" %} ({{ results.success|length }})
{% for user in results.success %} {% endfor %}
{% trans "Name" %} {% trans "Email" %}
{{ user.name }} {{ user.email }}
{% endif %} {% if results.errors %}
{% trans "Failed Imports" %} ({{ results.errors|length }})
{% for error in results.errors %} {% endfor %}
{% trans "Row" %} {% trans "Email" %} {% trans "Error" %}
{{ error.row }} {{ error.email }} {{ error.error }}
{% endif %}
{% endif %}
{% trans "Available Roles" %}
    {% for role in roles %}
  • {{ role.name }} {{ role.name }}
  • {% endfor %}
{% trans "Hospitals" %}
{% trans "Use these IDs in your CSV:" %}
    {% for hospital in hospitals %}
  • {{ hospital.name|truncatechars:25 }} {{ hospital.id }}
  • {% endfor %}
{% trans "Tips" %}
  • {% trans "Verify email addresses before uploading" %}
  • {% trans "Maximum 500 users per CSV file" %}
  • {% trans "Duplicate emails will be skipped" %}
  • {% trans "Invitation emails are sent automatically" %}
  • {% trans "Users have 7 days to complete onboarding" %}
{% endblock %}