Les organisateurs ne pouvaient pas valider les équipes

This commit is contained in:
Yohann D'ANELLO 2020-02-18 15:46:34 +01:00
parent 0dab65d82b
commit 0018ce05ec
2 changed files with 5 additions and 2 deletions

View File

@ -8,6 +8,9 @@ $trigram = htmlspecialchars($_GET["trigram"]);
$team = Team::fromTrigram($trigram);
$tournament = Tournament::fromId($team->getTournamentId());
if ($_SESSION["role"] == Role::ORGANIZER && !$tournament->organize($_SESSION["user_id"]))
require_once "server_files/403.php";
if ($team === null)
require_once "server_files/404.php";

View File

@ -78,7 +78,7 @@
</form>
<?php } ?>
<?php if ($team->getValidationStatus() == ValidationStatus::WAITING && $_SESSION["role"] == Role::ADMIN) { ?>
<?php if ($team->getValidationStatus() == ValidationStatus::WAITING) { ?>
<form method="POST">
<div class="form-group row">
<label for="message">Message à adresser à l'équipe :</label>
@ -96,7 +96,7 @@
<?php
}
if (!$team->isSelectedForFinal() && $team->getValidationStatus() == ValidationStatus::VALIDATED && $_SESSION["role"] == Role::ADMIN) { ?>
if (!$team->isSelectedForFinal() && $team->getValidationStatus() == ValidationStatus::VALIDATED) { ?>
<hr/>
<form method="POST">
<input class="btn btn-primary btn-lg btn-block" type="submit" name="select" value="Sélectionner pour la finale nationale"/>