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

{% block form_id %}launch_image_form{% endblock %}
{% block form_action %}{% url horizon:nova:images_and_snapshots:images:launch image.id %}{% endblock %}

{% block modal_id %}launch_image_{{ image.id }}{% endblock %}
{% block modal-header %}{% trans "Launch Instances" %}{% 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 "Specify the details for launching an instance. Also please make note of the table below; all projects have quotas which define the limit of resources they are allowed to provision." %}</p>
        <table class="table table-striped table-bordered">
          <tr>
            <th>{% trans "Quota Name" %}</th>
            <th>{% trans "Limit" %}</th>
          </tr>
          <tr>
            <td>{% trans "RAM (MB)" %}</td>
            <td>{{ quotas.ram }}MB</td>
          </tr>
          <tr>
            <td>{% trans "Floating IPs" %}</td>
            <td>{{ quotas.floating_ips }}</td>
          </tr>
          <tr>
            <td>{% trans "Instances" %}</td>
            <td>{{ quotas.instances }}</td>
          </tr>
          <tr>
            <td>{% trans "Volumes" %}</td>
            <td>{{ quotas.volumes }}</td>
          </tr>
          <tr>
            <td>{% trans "Available Disk" %}</td>
            <td>{{ quotas.gigabytes }}GB</td>
          </tr>
        </table>
</div>
{% endblock %}

{% block modal-footer %}
  <input class="btn primary pull-right" type="submit" value="{% trans "Launch Instance" %}" />
  <a href="{% url horizon:nova:images_and_snapshots:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}
