{% extends "base.html" %}
{% load i18n %}

{% block content %}
    <p class="discreet">
        {% blocktrans %}Select people in the form below or search users. When you send an invitation, they receive a message asking them to join your community.{% endblocktrans %}
    </p>

    <form action="" method="GET" class="edit-form three-blocks-form enableAutoFocus">
        <fieldset>
            <h2>{% blocktrans %}Search users{% endblocktrans %}</h2>
            <div class="formBlock">
                <label for="user_search">{% blocktrans %}Name, email, ...{% endblocktrans %}</label>
            </div>
            <div class="formBlock">
                <input type="text" value="{% if q %}{{ q }}{% endif %}" name="q" id="user_search" style="width: 220px" size="30" />
            </div>     
            <div class="formBlock">                                   
                <input type="submit" value="{% blocktrans %}Search{% endblocktrans %}" />   
            </div> 
            <div class="clear"><!-- --></div>
        </fieldset>
    </form>

    {#  This is either my current network OR user search result.  #}
    
    <form action="" method="POST" class="edit-form">
        {% csrf_token %}
        <fieldset>
            <h2>
                {% if q %}{% blocktrans %}Search results{% endblocktrans %}
                {% else %}{% blocktrans %}Invite people from your network{% endblocktrans %}
                {% endif %}       
            </h2>
        
            <div class="resultsInFormBlock">
                <div id="networkGrid" class="tnGrid tngridcols-9x">
                    {% for account in selectable %}
                        {% include "account/select.part.html" %}
                    {% empty %}
                        <p>{% blocktrans %}No results found.{% endblocktrans %}</p>
                    {% endfor %}
                </div>
                <div class="clear"><!-- --></div>
            </div>

            <div class="fieldWrapper">
                <label for="id_title">{% blocktrans %}Join users immediately{% endblocktrans %}</label>
                <input id="join_immediately" type="checkbox" name="join_immediately" />  
                <div class="clear"><!-- --></div>
            </div>

            <div class="form-controls">
                <input type="submit" value="{% blocktrans %}Invite{% endblocktrans %}" />
                <div class="clear"><!-- --></div>
            </div>

        </fieldset>
    </form>


{% endblock %}
