{% extends "base.html" %} {% block title %}Agent Invitation{% endblock %} {% block content %}

Agent invitation

{% if invalid_token %} Invalid Invitation {% elif expired %} Invitation Expired {% elif already_responded %} Invitation {% if invite.status == "accepted" %}Accepted{% elif invite.status == "rejected" %}Declined{% else %}{{ status }}{% endif %} {% elif rejecting %} Decline Invitation? {% else %} Accept Invitation? {% endif %}

{% if messages %}
{% for message in messages %}
{{ message }}
{% endfor %}
{% endif %} {% if invalid_token %}

This invitation link is invalid or has been removed.

Ask the agent owner to send a new invite.

{% elif expired %}

This invitation has expired.

Please contact {{ agent.user.get_full_name|default:agent.user.username }} to request a new invitation.

{% elif already_responded %}
{% if invite.status == "accepted" %}

You have accepted this invitation.

You can now communicate with {{ agent.name }} by email.

Send messages to:

{% for endpoint in agent.comms_endpoints.all %} {% if endpoint.channel == "email" and endpoint.is_primary %}

{{ endpoint.address }}

{% endif %} {% endfor %}
{% elif invite.status == "rejected" %}

You have declined this invitation.

{% else %}

This invitation has already been responded to.

{% endif %}
{% else %}

{{ agent.name }}

{{ agent.charter }}

Invited by {{ agent.user.get_full_name|default:agent.user.username }}

{% if can_accept %}
{% csrf_token %} Decline Invitation
{% elif can_reject %}
{% csrf_token %} Go Back
{% endif %}
{% endif %}
{% endblock %}