{% extends "horizon/common/_modal_form.html" %}
{% load i18n %}
{% load url from future %}

{% block form_id %}apply_network_template_form{% endblock %}
{% block form_action %}{% url 'horizon:project:connections:network_template:apply' template_id=template_id %}{% endblock %}

{% block modal-header %}{% trans "Apply Network Template" %}{% endblock %}

{% block modal-body %}
<div class="left">
    <fieldset>
    {% include "horizon/common/_form_fields.html" %}
    </fieldset>
</div>
<div class="right">
    <h3>{% trans "Description" %}:</h3>
    <p>{% trans "Network Templates are used to configure your network based on predefined templates." %}</p>
</div>
{% endblock %}

{% block modal-footer %}
   <input class="btn btn-primary pull-right" type="submit" value="{% trans "Apply Template" %}" />
   <a href="{% url 'horizon:project:connections:network_template:select' %}" class="btn secondary cancel close ajax-modal">{% trans "Previous" %}</a>

<script type='text/javascript'>
/**
*  Function to replace the properties of the html elements for closing the window.
**/
$(function(){
        //debugger
        window.setTimeout("delayClick()",50);
});
function delayClick(){
    //debugger
    $($(".close")[0]).prop("href","{% url 'horizon:project:connections:index' %}")
    $($(".close")[0]).attr("data-dismiss", "")
}
</script>
{% endblock %}
