{% extends 'base.html' %}
{% load static %}
{% block content %}
{% include 'profile/header.html' %}
{% load widget_tweaks %}

{% include 'profile/drawer.html' %}
<br><br><br><br>

<div class="container mt-5">
    <h1 class="text-center mb-4">افزودن/ویرایش وظیفه واحد</h1>

    <div class="card mb-4 animate__animated animate__delay-0.1s animate__fadeIn">
        <div class="card-body">
            <form method="POST" enctype="multipart/form-data">
                {% csrf_token %}
                <div class="row mb-4">
                    <div class="col-md-12">
                        <label for="{{ form.mainTask.id_for_label }}" class="form-label">وظایف اصلی</label>
                        {{ form.mainTask|add_class:"form-control form-control-lg" }}
                    </div>
                </div>
                <div class="row mb-4">
                    <div class="col-8 mt-4">
                        <button type="submit" class="btn btn-primary w-100">ذخیره</button>
                    </div>
                    <div class="col-4 mt-4">
                        <a href="{{ request.META.HTTP_REFERER|default:'#' }}" class="btn btn-secondary w-100">بازگشت</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

{% endblock %}
