Files
ESBSC-CONVOC/templates/events.php
T
2026-11-11 09:24:28 +01:00

3 lines
1.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<section class="card"><h2>Historique des cartons</h2><p>Les jaunes servent au suivi. Ils ne créent aucune sanction automatique. Un rouge crée une situation provisoire à rapprocher de la décision officielle.</p><div class="table-wrap"><table><thead><tr><th>Date</th><th>Licencié</th><th>Équipe</th><th>Carton</th><th>Période de l’avertissement (Footclubs)</th><th>Notes</th></tr></thead><tbody><?php foreach($events as $v): ?><tr><td><?=e($v['event_date'])?></td><td><?=e($v['name'])?></td><td><?=e($v['short_name'])?></td><td><?=e(['yellow'=>'Jaune','red'=>'Rouge','second_yellow_red'=>'Deuxième jaune / rouge','white'=>'Blanc','other'=>'Autre'][$v['event_type']])?></td><td><?=e(($v['warning_effective_date']??'')?:'Non renseignée')?> — <?=e(($v['warning_end_date']??'')?:'Non renseignée')?></td><td><?=e($v['notes'])?></td></tr><?php endforeach ?></tbody></table></div></section>
<?php if($write): ?><section class="card"><h2>Enregistrer un carton</h2><form method="post" action="/events/save"><?=csrf()?><input type="hidden" name="revision" value="<?=$revision?>"><div class="form-grid"><?=selectField('player_id','Licencié',options($players))?><?=selectField('team_id','Équipe',options($teams,'short_name'))?><?=field('event_date','Date',date('Y-m-d'),'date',true)?><?=selectField('event_type','Carton',['yellow'=>'Jaune','red'=>'Rouge','second_yellow_red'=>'Deuxième jaune / rouge','white'=>'Blanc'])?></div><?=field('notes','Notes')?> <button>Enregistrer le carton</button></form></section><?php endif ?>