{% extends 'sbas/base.html' %}

{% load static %}

{% load crispy_forms_tags %}

{% block js %}
  <!-- <script type="text/javascript" src="/admin/jsi18n/"></script> -->

  <script type="text/javascript"></script>

  {{ form.media }}
{% endblock %}
{% block content %}
  <div class="container py-3">
    <div class="d-flex justify-content-between align-items-start mb-3 flex-column flex-md-row">
      <div>
        <h2 class="h4 mb-2">Submit Question</h2>
      </div>
      {% if question %}
        {% include 'sbas/question_detail.html#links-partial' %}
      {% endif %}
    </div>

    <div class="card">
      <div class="card-body">
        <form action="" method="post" enctype="multipart/form-data" id="anatomyquestion-form">
          {% csrf_token %}

          {{ form.media }}

          <div class="mb-3">
            {% crispy form %}
          </div>

          <div class="d-grid gap-2 d-md-flex justify-content-md-end">
            <button type="submit" class="btn btn-primary">Submit</button>
            <a href="{% url 'sbas:index' %}" class="btn btn-outline-secondary">Cancel</a>
          </div>
        </form>
      </div>
    </div>
  </div>
{% endblock %}
