{% extends "BASE.html" %}
{% load static %}     
{% block 'titre_page' %} Gestion des projets {% endblock %}
{% block 'contenu' %}
    <button class="btn btn-primary mb-3">
        <i class="bi bi-caret-left-fill"></i> Retour
    </button>

    {% if messages %}
        {% for message in messages %}
            <div class="alert alert-{% if message.tags == "error" %}danger{% else %}success{% endif %} alert-dismissible fade show" role="alert">
            {{ message }}
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
            </div>
        {% endfor %}
    {% endif %}
    <div class="row d-flex justify-content-center">
        <div class="col-8 card bordered rounded py-4 px-2 ">
            <h5>Ajout du financement au projet (Nom du projet ici)</h5>
            <hr>
            <form method="POST" action="{% url 'gestion_projet:creation-projet' %}">
                {% csrf_token %}
                {{ formulaire_creation_projet.as_p }}
                <div class="d-flex justify-content-end">
                    <button type="submit" class="btn btn-danger">Annuler</button>
                    <a href="{% url 'gestion_projet:ajouter_financement' %}" class="btn btn-primary ms-2">Enregistrer et ajouter un financement</a>
                </div>
            </form>
        </div>
    </div>
{% endblock %}
{% block 'modal' %}
    {% include "gestion_projet/parts/modalAjoutProjet.html" %}
{% endblock %}
{% block 'js' %}
    <script type="text/javascript" src="{% static 'gestion_projet/js/index.js' %}"></script>
{% endblock %}