{% 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 'student_list' %}">Students</a></li>
      <li class="breadcrumb-item active" aria-current="page">Add</li>
    </ol>
</nav>

<h4 class="mb-3 fw-bold"><i class="fas fa-user-graduate me-2"></i>Student Add Form</h4>

{% include 'snippets/messages.html' %}

<form action="" method="POST">{% csrf_token %}
    <div class="row mb-3">
       
        <div class="col-md-6">
            <div class="card">
                <p class="form-title">Personal Info</p>
                <div class="card-body">
                    {{ form.first_name|as_crispy_field }}
                    {{ form.last_name|as_crispy_field }}
                    {{ form.gender|as_crispy_field }}
                    {{ form.email|as_crispy_field }}
                    {{ form.address|as_crispy_field }}
                    {{ form.phone|as_crispy_field }}
                </div>
            </div>
        </div>
        <div class="col-md-6 mr-auto">
            <div class="card">
                <p class="form-title">Others</p>
                <div class="card-body">
                    {{ form.program|as_crispy_field }}
                    {{ form.level|as_crispy_field }}
                </div>
            </div>
        </div>
    </div>

    <input class="btn btn-primary" type="submit" value="Save">
</form>

{% endblock content %}
