Files
2026-07-06 23:31:17 +02:00

57 lines
2.3 KiB
HTML

{% extends 'base.html' %}
{% block title %}{% if project %}Modifier{% else %}Nouveau{% endif %} projet{% endblock %}
{% block content %}
<div class="page-header">
<a href="{{ url_for('projects') }}" class="text-muted text-decoration-none small">
<i class="bi bi-arrow-left"></i> Projets
</a>
<h1 class="mt-1">{% if project %}Modifier {{ project.name }}{% else %}Nouveau projet{% endif %}</h1>
</div>
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-body">
<form method="POST">
<div class="mb-3">
<label class="form-label fw-semibold">Nom du projet *</label>
<input type="text" name="name" class="form-control" required
value="{{ project.name if project else '' }}"
placeholder="ex: Commande BlokGrip Q3 2026">
</div>
<div class="mb-3">
<label class="form-label fw-semibold">Client</label>
<select name="client_id" class="form-select">
<option value="">— Sans client —</option>
{% for c in clients %}
<option value="{{ c.id }}"
{% if project and project.client_id == c.id %}selected{% endif %}>
{{ c.name }}
</option>
{% endfor %}
</select>
</div>
<div class="mb-3">
<label class="form-label fw-semibold">Date limite de livraison</label>
<input type="date" name="deadline" class="form-control"
value="{{ project.deadline if project and project.deadline else '' }}">
</div>
<div class="mb-4">
<label class="form-label fw-semibold">Notes</label>
<textarea name="notes" class="form-control" rows="3"
placeholder="Description, contraintes, références...">{{ project.notes if project else '' }}</textarea>
</div>
<div class="d-flex gap-2">
<button type="submit" class="btn" style="background:#ff6b35;color:#fff">
<i class="bi bi-save me-1"></i>Enregistrer
</button>
<a href="{{ url_for('projects') }}" class="btn btn-outline-secondary">Annuler</a>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}