1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-24 17:00:34 +02:00

Organizers can change name & trigram

This commit is contained in:
Yohann D'ANELLO
2020-02-18 16:33:55 +01:00
parent d4fa8d9054
commit 88dcb68aa8
3 changed files with 100 additions and 1 deletions

View File

@ -59,6 +59,49 @@
?>
</div>
<?php if (isset($_GET["modifier"])) { ?>
<form method="POST">
<div class="form-row">
<div class="form-group col-md-6">
<label for="name">Nom :</label>
<input class="form-control" type="text" id="name" name="name" pattern="[A-Za-zÀ-ÿ ]+"
value="<?= $team->getName() ?>" required/>
</div>
<div class="form-group col-md-6">
<label for="trigram">Trigramme :</label>
<input class="form-control" type="text" id="trigram" name="trigram"
value="<?= $team->getTrigram() ?>" pattern="[A-Z]{3}" maxlength="3" required/>
</div>
</div>
<div class="form-group row">
<label for="tournament">Tournoi :</label>
<select id="tournament" name="tournament_id" class="custom-select">
<option value="0">Choisir un tournoi ...</option>
<?php
foreach (Tournament::getAllTournaments(false, true) as $tournament)
echo "<option value=\"" . $tournament->getId() . "\" "
. ($tournament->getId() == $team->getTournamentId() ? "selected" : "") . ">"
. $tournament->getName() . "</option>\n";
?>
</select>
</div>
<div class="form-group row">
<input class="btn btn-primary btn-lg btn-block" name="team_edit" type="submit"
value="Modifier l'équipe"/>
</div>
</form>
<?php }
if ($team->getValidationStatus() != ValidationStatus::VALIDATED) { ?>
<hr/>
<a href="/equipe/<?= $team->getTrigram() ?>/modifier"><button class="btn btn-secondary btn-lg btn-block">Modifier l'équipe</button></a>
<?php } ?>
<hr/>
<h2>Documents</h2>