{% extends "base.html" %}{% block title %}Ajouter un créneau de salle{% endblock %}{% block content %}
<div class="container main-content"><h1 class="h3">Ajouter un créneau de salle</h1><p class="text-muted">Saisissez un planning utilisable même lorsque Pronote n'est pas configuré.</p><form method="post" class="card card-body"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><div class="row g-3"><div class="col-md-6"><label class="form-label" for="room_id">Salle *</label><select class="form-select" id="room_id" name="room_id" required><option value="">Choisir</option>{% for room in rooms %}<option value="{{ room.id }}">{{ room.full_name }}</option>{% endfor %}</select></div><div class="col-md-3"><label class="form-label" for="week_start">Semaine du *</label><input class="form-control" id="week_start" name="week_start" type="date" required></div><div class="col-md-3"><label class="form-label" for="day_of_week">Jour *</label><select class="form-select" id="day_of_week" name="day_of_week" required>{% for value,label in [(0,'Lundi'),(1,'Mardi'),(2,'Mercredi'),(3,'Jeudi'),(4,'Vendredi'),(5,'Samedi'),(6,'Dimanche')] %}<option value="{{ value }}">{{ label }}</option>{% endfor %}</select></div><div class="col-md-3"><label class="form-label" for="start_time">Début *</label><input class="form-control" id="start_time" name="start_time" type="time" required></div><div class="col-md-3"><label class="form-label" for="end_time">Fin *</label><input class="form-control" id="end_time" name="end_time" type="time" required></div><div class="col-md-6"><label class="form-label" for="event_type">Type</label><select class="form-select" id="event_type" name="event_type"><option value="cours">Cours</option><option value="réunion">Réunion</option><option value="examen">Examen</option><option value="réservation">Réservation</option><option value="travaux">Travaux</option><option value="fermeture">Fermeture</option><option value="autre">Autre</option></select></div><div class="col-md-6"><label class="form-label" for="course_name">Libellé</label><input class="form-control" id="course_name" name="course_name"></div><div class="col-md-6"><label class="form-label" for="subject">Matière</label><input class="form-control" id="subject" name="subject"></div><div class="col-md-6"><label class="form-label" for="class_name">Classe/groupe</label><input class="form-control" id="class_name" name="class_name"></div><div class="col-12"><div class="form-check"><input class="form-check-input" id="protected_from_sync" name="protected_from_sync" type="checkbox"><label class="form-check-label" for="protected_from_sync">Conserver ce créneau lors des mises à jour automatiques</label><div class="form-text">À utiliser pour une réunion, un examen, des travaux ou une réservation décidée localement.</div></div></div></div><div class="mt-3"><button class="btn btn-primary">Enregistrer</button> <a class="btn btn-outline-secondary" href="{{ url_for('planning.room_schedules') }}">Annuler</a></div></form></div>{% endblock %}
