{% load i18n %}

<h2>{% trans 'Criteria' %}</h2>

<form action="{% url lfs_manage_save_discount_criteria discount.id %}"
      method="post">
    <div class="top-buttons">
        <a class="criterion-add-first-button"
           href="{% url lfs_add_criterion %}">
            <img class="icon-padding" 
                 src="{{ STATIC_URL }}icons/add.png"
                 alt="{% trans 'Add' %}" />
            
            {% trans 'Add criterion' %}
        </a>
    </div>

    <table class="criteria">
        {% for criterion in criteria %}
            {{ criterion|safe }}
        {% endfor %}
    </table>  

    <div class="buttons">
        <input class="ajax-save-button button" 
               type="submit" 
               value="{% trans 'Save criteria' %}" />
    </div>

</form>