{% extends request.is_ajax|yesno:'bajax.html,base.html' %}
{% load i18n %}

{% block title %}{% trans 'Belonging services for groups' %}{% endblock %}

{% block breadcrumb %}
    <ol class="breadcrumb">
        <li><span class="glyphicon glyphicon-home"></span></li>
        <li><a href="{% url 'abonapp:group_list' %}">{% trans 'User groups' %}</a></li>
        <li><a href="{% url 'abonapp:people_list' group.id %}">{{ group.title }}</a></li>
        <li class="active">{% trans 'Belonging services for groups' %}</li>
    </ol>
{% endblock %}

{% block page-header %}
    {% trans 'Belonging services for groups' %}
{% endblock %}

{% block main %}
    <form action="{% url 'abonapp:ch_group_tariff' group.pk %}" method="post" role="form">{% csrf_token %}
        {% for tariff in tariffs %}
            <div class="checkbox">
                <label>
                    {% if tariff.pk in seleted_tariffs %}
                        <input name="tr" type="checkbox" value="{{ tariff.pk }}" checked/>
                    {% else %}
                        <input name="tr" type="checkbox" value="{{ tariff.pk }}"/>
                    {% endif %}
                    {{ tariff.title }}, {{ tariff.amount }}{% trans 'currency' %}, {{ tariff.speedOut }}Mbit/s | {{ tariff.speedIn }}Mbit/s
                </label>
            </div>
        {% endfor %}
        <div class="btn-group">
            <input type="submit" class="btn btn-primary" value="{% trans 'Save' %}"> <input type="reset" class="btn btn-default" value="{% trans 'Reset' %}">
        </div>
    </form>
{% endblock %}
