<divclass="card mb-4"><divclass="card-header"><h5class="mb-0">Gestion et pannes récurrentes</h5></div><divclass="card-body"><formmethod="post"action="{{ url_for('equipments.category_recurrence_policy', id=category.id) }}"><inputtype="hidden"name="csrf_token"value="{{ csrf_token() }}"><divclass="mb-3"><labelclass="form-label">Mode de gestion par défaut</label><selectclass="form-select"name="default_management_mode">{% for value, label in [('quantitatif','Quantitatif'),('individuel_fixe','Individuel fixe'),('individuel_mobile','Individuel mobile'),('serialise','Sérialisé'),('structure','Élément de bâtiment'),('consommable','Consommable / stock')] %}<optionvalue="{{ value }}"{%ifcategory.default_management_mode ==value%}selected{%endif%}>{{ label }}</option>{% endfor %}</select></div><divclass="form-check mb-2"><inputclass="form-check-input"type="checkbox"name="enabled"id="recurrence"{%ifcategory.recurrence_alert_enabled%}checked{%endif%}><labelclass="form-check-label"for="recurrence">Alerter sur les pannes répétées de cette catégorie</label></div><divclass="row g-2"><divclass="col"><labelclass="form-label">Nombre de pannes</label><inputtype="number"min="1"name="threshold"class="form-control"value="{{ category.recurrence_threshold }}"></div><divclass="col"><labelclass="form-label">Sur une période de (jours)</label><inputtype="number"min="1"name="window_days"class="form-control"value="{{ category.recurrence_window_days }}"></div></div><buttonclass="btn btn-sm btn-primary mt-3">Enregistrer</button></form></div></div>