{% extends "pretixcontrol/item/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block inside %}
    <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
        {% csrf_token %}
        <div class="row">
            <div class="col-xs-12 col-lg-10">
                <fieldset>
                    <legend>{% trans "General information" %}</legend>
                    {% bootstrap_field form.name layout="horizontal" %}
                    {% bootstrap_field form.active layout="horizontal" %}
                    {% bootstrap_field form.category layout="horizontal" %}
                    {% bootstrap_field form.admission layout="horizontal" %}
                    {% bootstrap_field form.description layout="horizontal" %}
                    {% bootstrap_field form.picture layout="horizontal" %}
                </fieldset>
                <fieldset>
                    <legend>{% trans "Price settings" %}</legend>
                    {% bootstrap_field form.default_price layout="horizontal" %}
                    {% bootstrap_field form.tax_rate layout="horizontal" %}
                    {% bootstrap_field form.free_price layout="horizontal" %}
                </fieldset>
                <fieldset>
                    <legend>{% trans "Availability" %}</legend>
                    {% bootstrap_field form.available_from layout="horizontal" %}
                    {% bootstrap_field form.available_until layout="horizontal" %}
                    {% bootstrap_field form.max_per_order layout="horizontal" %}
                    {% bootstrap_field form.min_per_order layout="horizontal" %}
                    {% bootstrap_field form.require_voucher layout="horizontal" %}
                    {% bootstrap_field form.hide_without_voucher layout="horizontal" %}
                    {% bootstrap_field form.allow_cancel layout="horizontal" %}
                </fieldset>
            </div>
            <div class="col-xs-12 col-lg-2">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">
                            {% trans "Product history" %}
                        </h3>
                    </div>
                    {% include "pretixcontrol/includes/logs.html" with obj=item %}
                </div>
            </div>
        </div>
        <div class="form-group submit-group">
            <button type="submit" class="btn btn-primary btn-save">
                {% trans "Save" %}
            </button>
        </div>
    </form>
{% endblock %}
