{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}

{% block content %}

<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
    <ol class="breadcrumb">
      <li class="breadcrumb-item"><a href="/">Home</a></li>
      <li class="breadcrumb-item"><a href="{% url 'session_list' %}">Session List</a></li>
      <li class="breadcrumb-item active" aria-current="page">Session Form</li>
    </ol>
</nav>

{% if messages %}
    {% for message in messages %}
        {% if message.tags == 'error' %}
            <div class="alert alert-danger">
                <i class="fas fa-exclamation-circle"></i>{{ message }}
            </div>
        {% else %}
            <div class="alert alert-success">
                <i class="fas fa-check-circle"></i>{{ message }}
            </div>
        {% endif %}
    {% endfor %}
{% endif %}

<div class="row">
    <div class="col-md-6 mx-auto">
        <div class="card pb-3">
            <p class="form-title">Session Add & update Form</p>
            <div class="container"><br>
                <form action="" method="POST">{% csrf_token %}
                    {{ form|crispy }}
                    <input class="btn btn-primary" type="submit" value="Save">
                </form>
            </div>
        </div>
    </div>
</div>

{% endblock content %}
