{% from "devhub/includes/macros.html" import tip, empty_unless %} {{ csrf() }} {% set editable = (context == 'edit' and editable) or context == 'submit' %}
{% if context == 'edit' %} {% endif %} {% if context == 'edit' %} {% endif %}
{{ _('Add-on Media for {0}')|fe(addon.name) }}
{{ tip(_("Add-on icon"), _("Upload an icon for your add-on or choose from one of ours. The " "icon is displayed nearly everywhere your add-on is. Uploaded images " "must be one of the following image types: .png, .jpg. " "It is only relevant for listed add-ons.")) }} {% if context == 'submit' %} {% endif %} {% if editable %}
{# L10n: The size of the icon #} {{ _('32x32px') }} {{ tip(None, _("Used in listings of add-ons, like search results " "and featured add-ons.")) }}
{# L10n: The size of the icon #} {{ _('64x64px') }} {{ tip(None, _("Used in add-on detail pages.")) }}
    {{ form.icon_type }}
{{ form.icon_upload_hash }}
{% trans %} PNG and JPG supported. Icons resized to 64x64 pixels if larger. {% endtrans %}
{% else %}
{% endif %}
{% if context == 'submit' %} {% endif %}
{% if editable %} {% if preview_form %} {{ preview_form.management_form }} {{ preview_form.non_form_errors() }}
{% for form in preview_form.forms %}
  {% if form.instance.id %}
{% else %}
{% endif %} {{ form.id }} {{ form.DELETE }}{{ form.DELETE.label_tag() }}
{{ form.caption }} x
{{ form.position }}
{{ form.upload_hash }}
{{ form.errors }}
{% endfor %}
{% endif %} {% else %} {% for preview in addon.previews.all() %}
{% endfor %} {% endif %}
{% if editable and context == 'edit' %} {% elif context == 'submit' %}
{% endif %}