{% load crispy_forms_tags %}
{% csrf_token %}
{% if number_of_usernames_found %} Found {{number_of_usernames_found}} of {{number_of_usernames_searched}} usernames searched. {% elif matches %} Found {{matches|length}} match{{matches|length|pluralize}}. {% endif %}
{% if usernames_not_found %} Username{{usernames_not_found|length|pluralize}} missing from database {{usernames_not_found|length|pluralize:"is, are"}}: {{ usernames_not_found|join:", " }}. {% endif %}
{% if users_already_in_project %} The following user{{users_already_in_project|length|pluralize}} {{users_already_in_project|length|pluralize:"is, are"}} already in project: {{users_already_in_project|join:", "}} {% endif %}
{% if matches %}
Available Allocations
{{allocation_form|crispy}}
{% for form in formset %} {% endfor %}
# Username First Name Last Name Email Role
{{ form.selected }} {{ forloop.counter }} {{ form.username.value }} {{ form.first_name.value }} {{ form.last_name.value }} {{ form.email.value }} {{ form.role }}
{{ formset.management_form }}
{% if matches %} {% endif %} Back to Project
{% else %}
No results!
{% endif %}