{% extends "admin/change_form.html" %}

<!-- LOADING -->
{% load static i18n admin_modify admin_urls %}
{% load setting_tags %}
<!-- JAVASCRIPTS -->
{% block javascripts %}
  {{ block.super }}
{% endblock %}

{% block extrahead %}
  <link rel="stylesheet" href="{% static "admin/formulaic/ember-formulaic/dist/assets/vendor.css" %}">
  <link rel="stylesheet" href="{% static "admin/formulaic/ember-formulaic/dist/assets/ember-formulaic.css" %}">

  <meta name="ember-formulaic/config/environment" content="{{ environment_config }}" />

      <script src="https://cdn.tiny.cloud/1/{% formulaic_tinymce_key %}/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>

  {{ block.super }}
{% endblock %}

<!-- COLTYPE/BODYCLASS -->
{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} grp-change-form{% endblock %}
{% block content-class %}{% endblock %}

<!-- PAGE-TOOLS -->
{% block page-tools %}{% endblock %}

<!-- OBJECT TOOLS -->
{% block object-tools %}{% endblock %}

<!-- CONTENT -->
{% block content %}
  <div id="formulaic-container"></div>

  {% if original %}
    <form
      id="ld-submissions-dl-{{ original.id }}"
      class="handl-task-start-form"
      action="/athena/handl/task/start/"
      method="POST"
    >
        <input type="hidden" name="task_name" value="formulaic.create_submission_csv"/>
        <input type="hidden" name="task_data" value='{{ task_data }}'/>
    </form>
  {% endif %}

  <script src="{% static "admin/formulaic/ember-formulaic/dist/assets/vendor.js" %}"></script>
  <script src="{% static "admin/formulaic/ember-formulaic/dist/assets/ember-formulaic.js" %}"></script>
{% endblock %}
