{% extends "mygame/company.html" %} {% block content %} {% load filters %}
<div>
  <h1
    class="text-center font-weight-bold border-bottom border-2 border-primary p-3 m-3 shadow rounded"
  >
    E-Mails
  </h1>

  <form
    class="row g-0 justify-content-evenly m-2"
    action="{% url 'companyEvent' gameid=game.id username=user.username eventnumber=eventnumber%}"
    method="post"
  >
    {% csrf_token %}
    <div class="col-md-6">
      <div class="d-grid gap-2">
        <input
          class="btn btn-primary btn-block m-2"
          type="submit"
          value="previous"
          id="previous"
          name="action"
        />
      </div>
    </div>
    <div class="col-md-6">
      <div class="d-grid gap-2">
        <input
          class="btn btn-primary btn-block m-2"
          type="submit"
          value="next"
          id="next"
          name="action"
        />
      </div>
    </div>
  </form>
  <div
    class="row g-0 justify-content-center border border-secondary-subtle rounded m-3"
  >
    <div class="col-md-10">
      <h2
        class="border-bottom border-1 border-primary p-2 m-2 mt-4 shadow rounded text-center"
      >
        {{companyevent.name}}
      </h2>
    </div>
    <div class="col-md-9 m-4">{{companyevent.description}}</div>

    {%if companyevent.modelset == False%}
    <form
      class="col-md-8"
      action="{% url 'companyEventSetModel' gameid=game.id username=user.username eventid=companyevent.id modelnumber=0%}"
      method="post"
    >
      {% csrf_token %}
      <div class="d-grid gap-2">
        <input
          class="btn btn-warning btn-block m-2"
          type="submit"
          value="choose model"
          id="choose model"
          name="action"
        />
      </div>
    </form>
    {%endif%} {% if companyevent|isInstanceOf:"SpecialOrder" %}
    <form
      class="row g-0 justify-content-evenly m-2"
      action="{% url 'companySpecialOrder' gameid=game.id username=user.username specialorderid=companyevent.id%}"
      method="post"
    >
      {% csrf_token %}
      <div class="row justify-content-center">
        <div class="col-md-4">
          <div class="d-grid gap-2">
            <input
              class="btn btn-success btn-block m-2"
              type="submit"
              value="handle"
              id="handle"
              name="action"
            />
          </div>
        </div>
        <div class="col-md-4">
          <div class="d-grid gap-2">
            <input
              class="btn btn-danger btn-block m-2"
              type="submit"
              value="ignore"
              id="ignore"
              name="action"
            />
          </div>
        </div>
      </div>
    </form>
    {%endif%}
  </div>
</div>
{% endblock %}
