{# -*- engine:django -*- #}

{% extends "core/base.html" %}
{% load material_form i18n any_js %}

{% block extra_head %}
    {{ edit_supervision_substitution_form.media.css }}
    {% include_css "select2-materialize" %}
{% endblock %}

{% block browser_title %}{% blocktrans %}Edit substitution.{% endblocktrans %}{% endblock %}
{% block page_title %}{% blocktrans %}Edit substitution{% endblocktrans %}{% endblock %}

{% block content %}
  <p class="flow-text">{{ date }}: {{ supervision }}</p>
  <form method="post">
    {% csrf_token %}

    {% form form=edit_supervision_substitution_form %}{% endform %}

    {% include "core/partials/save_button.html" %}
    {% if substitution %}
      <a href="{% url 'delete_supervision_substitution' substitution.supervision.id week %}"
         class="btn red waves-effect waves-light">
        <i class="material-icons iconify left" data-icon="mdi:delete-outline"></i> {% trans "Delete" %}
      </a>
    {% endif %}
  </form>
  {% include_js "select2-materialize" %}
  {{ edit_supervision_substitution_form.media.js }}
{% endblock %}
