{% extends "base/headermenu.html" %}
{% load i18n %}

{% block contents %}

 <p><br></p>

  <div class="mainbox">
    <div class="inner">
      <div class="top"><span></span></div>
        <div class="content">
          <p>
            <h3>出品フォーム</h3>

            <p>

<form enctype="multipart/form-data"  action="{% url djanction.item.views.item %}" method="POST">
<table>
{{ form }}
{% if form.image1exist %}
<tr>
  <td colspan=2><img src="{% url top_page %}static/img/items/{{ form.instance.id }}/1.jpeg" style="width:600px;" alt="{% trans 'image1' %}"></td>
</tr>
{% endif %}
{% if form.image2exist %}
<tr>
  <td colspan=2><img src="{% url top_page %}static/img/items/{{ form.instance.id }}/2.jpeg" style="width:600px;" alt="{% trans 'image2' %}"></td>
</tr>
{% endif %}
{% if form.image3exist %}
<tr>
  <td colspan=2><img src="{% url top_page %}static/img/items/{{ form.instance.id }}/3.jpeg" style="width:600px;" alt="{% trans 'image3' %}"></td>
</tr>
{% endif %}
</table>

</table>

            </p>
            <p>
{% if id %}
<input type="submit" value="更新"/>
{% else %}
<input type="submit" value="登録"/>
{% endif %}
</form>

            </p>
          </p>
        </div>
        <div class="base"><span></span></div>
      </div>
    </div>
  </div>

{% endblock %}
