2026-08-14 18:02:25 +02:00
{% extends "base.html" %}
{% block title %}Nouveau service — GMAO{% endblock %}
{% block content %}
< div class = "container-fluid" >
< div class = "d-flex justify-content-between align-items-center mb-4" >
2026-08-15 00:47:55 +02:00
< h1 > < i class = "bi bi-plus-circle" > < / i > {{ 'Modifier le service' if service is defined else 'Nouveau service' }}< / h1 >
2026-08-14 18:02:25 +02:00
< a href = "{{ url_for('services.index') }}" class = "btn btn-secondary" >
< i class = "bi bi-arrow-left" > < / i > Retour
< / a >
< / div >
< div class = "card" >
< div class = "card-body" >
< form method = "POST" >
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
< div class = "mb-3" >
< label class = "form-label" > Nom *< / label >
2026-08-15 00:47:55 +02:00
< input type = "text" name = "name" class = "form-control" value = "{{ service.name if service is defined else '' }}" required >
2026-08-14 18:02:25 +02:00
< / div >
< div class = "mb-3" >
< label class = "form-label" > Description< / label >
2026-08-15 00:47:55 +02:00
< textarea name = "description" class = "form-control" rows = "3" > {{ service.description if service is defined and service.description else '' }}< / textarea >
2026-08-14 18:02:25 +02:00
< / div >
2026-08-15 00:47:55 +02:00
{% if service is defined %}< div class = "form-check mb-3" > < input class = "form-check-input" type = "checkbox" name = "is_active" id = "is_active" { % if service . is_active % } checked { % endif % } > < label class = "form-check-label" for = "is_active" > Service actif< / label > < / div > {% endif %}
2026-08-14 18:02:25 +02:00
< div class = "text-end" >
< button type = "submit" class = "btn btn-primary" >
2026-08-15 00:47:55 +02:00
< i class = "bi bi-check-lg" > < / i > Enregistrer
2026-08-14 18:02:25 +02:00
< / button >
< / div >
< / form >
< / div >
< / div >
< / div >
2026-08-15 00:47:55 +02:00
{% endblock %}