{% load i18n %}
<form role="form" action="{% url 'abonapp:attach_nas' gid %}" method="post"> {% csrf_token %}
    <div class="modal-header primary">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title"><span class="glyphicon glyphicon-globe"></span>{% trans 'Attach gateway' %}</h4>
    </div>

    <div class="modal-body">
        <div class="form-group-sm">
            <label class="control-label" for="id_gateway">{% trans 'Select gateway' %}</label>
            <select name="gateway" class="form-control" id="id_gateway">
                {% for nas in nas_list %}
                    <option value="{{ nas.pk }}">{{ nas.title }}</option>
                {% empty %}
                    <option value="0">{% trans 'Gateways does not exist' %}</option>
                {% endfor %}
            </select>
        </div>

        <div class="btn-group">
            <button type="submit" class="btn btn-primary">
                <span class="glyphicon glyphicon-save"></span> {% trans 'Attach' %}
            </button>
        </div>
    </div>

</form>
