{% load i18n avatar_tags %}
<form id="member-add-form"  method="post" name="member-add-form" class="tab-popup hide">{% csrf_token %}
    <h3 class="hd">{% trans "Add members"%}</h3>
    <div id="member-add-tabs" class="tab-popup-tabs">
        <ul class="tab-popup-tabs-nav">
            <li class="tab"><a href="#enter" class="a">{% trans 'Enter' %}</a></li>
            <li class="tab"><a href="#contact-options" class="a">{% trans 'Contacts' %}</a></li>
        </ul>
        <div id="enter">
            <textarea id="added-member-name" name="user_name" placeholder="{% trans "emails, separated by ','" %}"></textarea><br />
            {% if cloud_mode and not org %}
            <p class="tip">{% trans "Tip: an invitation will be sent if the email is not registered."%}</p>
            {% else %}
            <p class="tip">{% trans "Tip: the emails should be already registered."%}</p>
            {% endif %}
        </div>
        <div id="contact-options" class="hide">
            <ul class="option-list">
            {% for contact in contacts %}
            <li>
            <label class="checkbox-label">
                <span class="checkbox"><input type="checkbox" name="contact" value="{{ contact.contact_email }}" class="checkbox-orig" /></span>
                {% avatar contact.contact_email 20 %} <span class="checkbox-option">{{ contact.contact_email }}</span>
            </label>
            </li>
            {% endfor %}
        </ul>
        </div>
    </div>
    <div class="bot">
        <p class="error hide"></p>
        <input type="submit" value="{% trans "Submit"%}" />
    </div>
</form>
