2019-09-09 23:48:52 +00:00
|
|
|
<?php
|
|
|
|
require_once "header.php";
|
|
|
|
?>
|
|
|
|
|
2019-09-24 22:43:26 +00:00
|
|
|
<div class="mt-4 mb-4">
|
|
|
|
<h1 class="display-4">Mon équipe</h1>
|
|
|
|
</div>
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-09-24 22:43:26 +00:00
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Nom de l'équipe :</strong> <?= $team->getName() ?>
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Trigramme :</strong> <?= $team->getTrigram() ?>
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-info">
|
2019-10-22 12:55:33 +00:00
|
|
|
<strong>Problème :</strong>
|
|
|
|
<?= $team->getProblem() == 0 ? "Pas de problème choisi" : $team->getProblem() ?>
|
2019-09-24 22:43:26 +00:00
|
|
|
</div>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<?php
|
|
|
|
if ($team->getEncadrantId() !== null) {
|
|
|
|
$encadrant = User::fromId($team->getEncadrantId());
|
|
|
|
$id = $encadrant->getId();
|
2019-11-27 11:15:21 +00:00
|
|
|
echo "<strong>Encadrant :</strong> " . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "<br />";
|
2019-09-24 22:43:26 +00:00
|
|
|
}
|
|
|
|
for ($i = 1; $i <= 5; ++$i) {
|
|
|
|
if ($team->getParticipants()[$i - 1] == NULL)
|
|
|
|
continue;
|
|
|
|
$participant = User::fromId($team->getParticipants()[$i - 1]);
|
|
|
|
$id = $participant->getId();
|
2019-11-27 11:15:21 +00:00
|
|
|
echo "<strong>Participant $i :</strong> " . $participant->getFirstName() . " " . $participant->getSurname() . "<br />";
|
2019-09-24 22:43:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
Code d'accès : <strong><?= $team->getAccessCode() ?></strong>
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<!--suppress HtmlUnknownTarget -->
|
2019-10-06 22:12:23 +00:00
|
|
|
<strong>Autorise Animath à diffuser mes vidéos à la fin des Correspondances :</strong>
|
2019-10-04 20:36:23 +00:00
|
|
|
<?= $team->allowPublish() ? "oui" : "non" ?> (<a href="/mon-equipe/diffusion-videos">changer</a>)
|
2019-09-24 22:43:26 +00:00
|
|
|
</div>
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-09-12 16:47:57 +00:00
|
|
|
<?php if (date("Y-m-d H:i:s") >= $CONFIG->getInscriptionDate() && $team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
2019-09-24 22:43:26 +00:00
|
|
|
<div class="alert alert-danger">
|
|
|
|
La date limite d'inscription est dépassée, vous ne pouvez plus demander la validation de votre équipe.
|
|
|
|
</div>
|
2019-09-12 16:47:57 +00:00
|
|
|
<?php } else {
|
2019-10-22 12:55:33 +00:00
|
|
|
if (isset($_GET["modifier"]) && $team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-09-12 16:47:57 +00:00
|
|
|
<form method="POST">
|
2019-09-24 22:43:26 +00:00
|
|
|
<div class="form-row">
|
|
|
|
<div class="form-group col-md-6">
|
|
|
|
<label for="name">Nom :</label>
|
2019-10-06 12:03:02 +00:00
|
|
|
<input class="form-control" type="text" id="name" name="name" pattern="[A-Za-zÀ-ÿ ]+"
|
2019-09-24 22:43:26 +00:00
|
|
|
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="problem">Problème :</label>
|
|
|
|
<select id="problem" name="problem" class="custom-select">
|
2019-10-22 12:55:33 +00:00
|
|
|
<option value="0">Choisir un problème ...</option>
|
2019-09-24 22:43:26 +00:00
|
|
|
<?php
|
|
|
|
for ($i = 1; $i <= 4; ++$i)
|
2019-10-22 12:55:33 +00:00
|
|
|
echo "<option value='$i' " . ($team->getProblem() == $i ? "selected" : "") . ">Problème $i</option>";
|
2019-09-24 22:43:26 +00:00
|
|
|
?>
|
|
|
|
</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>
|
2019-09-09 23:48:52 +00:00
|
|
|
</form>
|
2019-09-12 16:47:57 +00:00
|
|
|
|
|
|
|
<?php } else { ?>
|
|
|
|
|
2019-09-24 08:08:53 +00:00
|
|
|
<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY && date("Y-m-d H:i:s") <= $CONFIG->getInscriptionDate()) { ?>
|
2019-09-12 16:47:57 +00:00
|
|
|
<!--suppress HtmlUnknownTarget -->
|
2019-09-24 22:43:26 +00:00
|
|
|
<a href="/mon-equipe/modifier">
|
|
|
|
<button class="btn btn-secondary btn-lg btn-block">Modifier mon équipe</button>
|
|
|
|
</a>
|
2019-09-12 16:47:57 +00:00
|
|
|
<?php } ?>
|
2019-10-04 19:31:34 +00:00
|
|
|
<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
2019-09-12 16:47:57 +00:00
|
|
|
<hr/>
|
2019-09-24 22:43:26 +00:00
|
|
|
|
|
|
|
<form method="POST">
|
2019-10-06 11:29:20 +00:00
|
|
|
<input class="btn btn-primary btn-lg btn-block" type="submit" name="leave_team" style="background-color: #ff2e34"
|
2019-09-24 22:43:26 +00:00
|
|
|
value="Quitter l'équipe"/>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
$can_validate = canValidate($team);
|
|
|
|
if ($can_validate) { ?>
|
2019-09-24 23:08:38 +00:00
|
|
|
<hr />
|
2019-09-24 22:43:26 +00:00
|
|
|
<form method="post">
|
2019-09-24 23:08:38 +00:00
|
|
|
<label for="engage">Je m'engage à participer à l'intégralité des Correspondances</label>
|
2019-10-22 12:55:33 +00:00
|
|
|
<input type="checkbox" name="engage" id="engage" required/>
|
2019-10-12 10:40:11 +00:00
|
|
|
<div class="alert alert-warning">
|
|
|
|
<strong>Attention !</strong> Une fois votre équipe validée, vous ne pourrez plus modifier le nom
|
|
|
|
de l'équipe, le trigramme, le problème sur lequel vous souhaitez travailler ou la composition de l'équipe.
|
|
|
|
</div>
|
2019-09-24 22:43:26 +00:00
|
|
|
<input class="btn btn-primary btn-lg btn-block" type="submit" name="request_validation"
|
|
|
|
value="Demander la validation"/>
|
|
|
|
</form>
|
2019-10-21 21:48:24 +00:00
|
|
|
<?php } else { ?>
|
2019-10-22 12:55:33 +00:00
|
|
|
<hr />
|
2019-10-21 21:48:24 +00:00
|
|
|
<div class="alert alert-warning">
|
|
|
|
Pour demander à valider votre équipe, vous devez avoir au moins un encadrant, trois participants,
|
|
|
|
choisi un problème et soumis une autorisation de droit à l'image par participant.
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2019-09-24 23:08:38 +00:00
|
|
|
<?php }
|
|
|
|
elseif ($team->getValidationStatus() == ValidationStatus::WAITING) { ?>
|
|
|
|
<div class="alert alert-warning">
|
|
|
|
Votre équipe est en attente de validation.
|
|
|
|
</div>
|
2019-09-27 22:12:40 +00:00
|
|
|
<?php } ?>
|
2019-09-09 23:48:52 +00:00
|
|
|
<?php } ?>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php require_once "footer.php" ?>
|