{% 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:"es"}}. {% 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
{% for form in allocation_formset %} {% endfor %}
# Resource Details Resource Type Status
{{ form.selected }} {{ form.pk.value }} {{ form.resource.value }} {{ form.details.value }} {{ form.resource_type.value }} {{ form.status.value }}
{{ allocation_formset.management_form }}
{% 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 %}
{% comment %} if eula box is in focus, then required {% endcomment %}