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

{% block form_id %}create_image_form{% endblock %}
{% block ng_controller %}ImageFormCtrl{% endblock %}
{% block form_action %}{% url 'horizon:project:images:images:create' %}{% endblock %}
{% block form_attrs %}enctype="multipart/form-data"{% endblock %}

{% block modal-header %}{% trans "Create An Image" %}{% endblock %}

{% block modal-body-right %}
  <h3>{% trans "Description:" %}</h3>
  <p>
     {% if HORIZON_IMAGES_ALLOW_UPLOAD %}
          {% trans "Images can be provided via an HTTP URL or be uploaded from your local file system. Compressed image binaries are supported (.zip and .tar.gz.)" %}
     {% else %}
          {% trans "Currently only images available via an HTTP URL are supported. The image location must be accessible to the Image Service. Compressed image binaries are supported (.zip and .tar.gz.)" %}
     {% endif %}
  </p>
  <p>
     <strong>{% trans "Please note: " %}</strong>
     {% if HORIZON_IMAGES_ALLOW_UPLOAD %}
         {% trans "If you select an image via an HTTP URL, the Image Location field MUST be a valid and direct URL to the image binary; it must also be accessible to the Image Service. URLs that redirect or serve error pages will result in unusable images." %}
     {% else %}
         {% trans "The Image Location field MUST be a valid and direct URL to the image binary. URLs that redirect or serve error pages will result in unusable images." %}
     {% endif %}
  </p>
{% endblock %}

{% block modal-footer %}
  <input class="btn btn-primary pull-right" type="submit" value="{% trans 'Create Image' %}" />
  <a href="{% url 'horizon:project:images:index' %}" class="btn btn-default secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}
