{% extends 'base.html' %}
{% load i18n bootstrap3 globaltags %}

{#{% block additional_link %}#}
{#    <script src="/static/js/cidr.js"></script>#}
{#{% endblock %}#}

{% block title %}{{ object }}{% endblock %}

{% block breadcrumb %}
    <ol class="breadcrumb">
        <li><span class="glyphicon glyphicon-home"></span></li>
        <li><a href="{% url 'ip_pool:networks' %}">{% trans 'Ip pool' %}</a></li>
        <li class="active">{{ object }}</li>
    </ol>
{% endblock %}

{% block page-header %}
    {{ object }}
{% endblock %}

{% block main %}
    <form action="{% url 'ip_pool:net_edit' object.pk %}" method="post">{% csrf_token %}
    <div class="panel panel-default cidr-contain">
        <div class="panel-heading">
            <h3 class="panel-title">{% trans 'Edit network' %} <span>{{ object.get_network }}</span></h3>
        </div>
        <div class="panel-body">
            {% bootstrap_form form %}
        </div>
        <div class="panel-footer">
            <div class="btn-group">
                <button class="btn btn-primary">
                    <span class="glyphicon glyphicon-save"></span> {% trans 'Save' %}
                </button>
                <a href="{% url 'ip_pool:net_delete' object.pk %}" class="btn btn-danger btn-modal">
                    <span class="glyphicon glyphicon-remove"></span>
                    <span class="hidden-sm hidden-xs">{% trans 'Remove' %}</span>
                </a>
                <a href="{% back_url request %}" class="btn btn-default">
                    <span class="glyphicon glyphicon-backward"></span> {% trans 'Back' %}
                </a>
                <a href="{% url 'ip_pool:net_groups' object.pk %}" class="btn btn-default">
                    <span class="glyphicon glyphicon-user"></span>
                    <span class="hidden-xs hidden-sm">{% trans 'Groups available' %}</span>
                </a>
            </div>
        </div>
    </div>
    </form>
{% endblock %}
