{% extends "base.html" %}
{% load crispy_forms_tags %}

{% block content %}
<div class="container my-5">
    <div class="row justify-content-center">
        <div class="col-lg-8">
            <div class="card bg-dark border-secondary text-white shadow">
                <div class="card-header border-secondary py-3">
                    <h2 class="h4 card-title text-white mb-0">
                        {% if survey %}<i class="bi bi-pencil me-2 text-warning"></i>Edit Survey details{% else %}<i class="bi bi-plus-lg me-2 text-primary"></i>Create New Survey{% endif %}
                    </h2>
                </div>
                <div class="card-body">
                    <form method="post">
                        {% csrf_token %}
                        {{ form|crispy }}
                        
                        <div class="d-flex justify-content-between mt-4">
                            <a href="{% url 'survey:survey_list' %}" class="btn btn-secondary">
                                <i class="bi bi-arrow-left me-1"></i>Cancel
                            </a>
                            <button type="submit" class="btn btn-primary">
                                <i class="bi bi-check-lg me-1"></i>Save Survey
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
