{% extends "base_detail.html" %}

{% load guardian_tags %}
{% load institutions %}
{% load community_buttons %}
{% load community_badges %}
{% load community_utils %}
{% load activities %}
{% load bootstrap_helpers %}
{% load django_bootstrap5 %}
{% load members %}
{% load cms_tags %}

{% block headline %}Edit {{ session }}{% endblock %}
{% block title %}{{ session }}{% endblock %}

{% block sidebar_below %}
  {% block sidebar_left %}
    {% include "programme/components/session_form_sidebar.html" %}
  {% endblock %}
{% endblock %}

{% block breadcrumbs %}
  {% url "events:event-list" as event_list_url %}
  {% url "events:programme:session-list" session.event.slug as programme_url %}
  {% if not session.event.single_session_mode %}
    {% breadcrumbs "Events"|combine:event_list_url session.event.name|combine:session.event.get_absolute_url "Programme"|combine:programme_url session.title|combine:session.get_absolute_url "Edit"|combine:request.path %}
  {% else %}
    {% breadcrumbs "Events"|combine:event_list_url session.event.name|combine:session.event.get_absolute_url "Edit"|combine:request.path %}
  {% endif %}
{% endblock %}

{% block content %}

  {% block form_content %}
    <form role="form" method="post">
      {% csrf_token %}
      {% bootstrap_form form %}

      <div class="row row-cols-auto m-3">
        {% bootstrap_button "OK" button_type="submit" extra_classes="me-2" %}
        {% bootstrap_button "Reset" button_type="reset"  %}
        {% bootstrap_button content="Cancel" extra_classes="ms-auto" button_type="link" href=session.get_absolute_url %}
      </div>
    </form>
  {% endblock %}


{% endblock %}
