{% extends "horizon/common/_modal_form.html" %}
{% load i18n %}
{% load static %}

{% block form_id %}import_bundle{% endblock %}
{% block form_action %}{% url 'horizon:murano:packages:import_bundle' %}{% endblock %}

{% block modal_id %}upload_bundle_modal{% endblock %}
{% block modal-header %}{% trans 'Import Bundle' %}{% endblock %}

{% block modal-body %}
    <div class="left" >
    {{ wizard.management_form }}
    {% if wizard.form.forms %}
        {{ wizard.form.management_form }}
        {% for form in wizard.form.forms %}
            {{ form }}
        {% endfor %}
    {% else %}
        <fieldset>
        {% with form=wizard.form %}
            {% include "horizon/common/_form_fields.html" %}
        {% endwith %}
        </fieldset>
    {% endif %}
    </div>
    <div class="right">
        <div class='description-by_name'>
            <h3>{% trans "Description" %}:</h3>
            <p><strong>{% trans "Bundle Name" %}: </strong>{% trans "Bundle's full name."%}</p>
            <p>{% blocktrans trimmed %}The bundle is going to be installed from <a href="{{murano_repo_url}}" target="_blank">{{murano_repo_url}}</a> repository.{% endblocktrans %}</p>
        </div>
        <div class='description-by_url'>
            <h3>{% trans "Description" %}:</h3>
            <p><strong>{% trans "Bundle URL" %}: </strong>{% trans "HTTP/HTTPS URL of the bundle file."%}</p>
        </div>
        <div class='description-common'>
            <p><strong><i>{% trans "Note" %}: </i></strong>{% trans "You'll have to configure each package installed from this bundle separately." %}
            <br>{% trans "If packages depend upon other packages and/or require specific glance images, those are going to be installed with them from murano repository." %}
            </p>
        </div>
    </div>
{% endblock %}

{% block modal-footer %}
    <a href='{% url 'horizon:murano:packages:index' %}' class='btn btn-default cancel'>{% trans 'Cancel' %}</a>
    {% if wizard.steps.next %}
        <input type='submit' class='btn btn-primary'  value='{% trans 'Next' %}'/>
    {% else %}
        <input type='submit' class='btn btn-primary'  value='{% trans 'Create' %}'/>
    {% endif %}
{% endblock %}
