1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 01:00:32 +02:00

Diverses corrections

This commit is contained in:
Yohann D'ANELLO
2020-01-16 22:04:29 +01:00
parent 606ad5886f
commit 95ab142702
10 changed files with 71 additions and 58 deletions

View File

@ -52,7 +52,7 @@
<li class="nav-item active">
<a class="nav-link" href="/mon-equipe">Mon équipe</a>
</li>
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED || true) { ?>
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED) { ?>
<li class="nav-item active">
<a class="nav-link" href="/paiement">Paiement</a>
</li>
@ -117,7 +117,7 @@
</div>
<?php }
if (!isset($_SESSION["user"]) && $view != "server_files/controllers/connexion.php") {
if (getallheaders()["X-Real-Ip"] != "185.230.76.133") {
echo "<div style=\"text-align: center;\" class=\"alert alert-success\"><h1>Cette plateforme ouvrira le 22 janvier 2020 ! :)</h1></div>";
require_once "footer.php";
}

View File

@ -104,48 +104,50 @@ if (!$has_error) {
Adresse e-mail du responsable légal : <a href="mailto:<?= $user->getResponsibleEmail() ?>"><?= $user->getResponsibleEmail() ?></a>
</div>
<div class="alert alert-info">
<strong>Récapitulatif du paiement :</strong><br /><br />
<?php if ($user->getRole() == Role::PARTICIPANT && $user->getTeamId() > 0) { ?>
<div class="alert alert-info">
<strong>Récapitulatif du paiement :</strong><br /><br />
<?php if ($payment->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
<div class="alert alert-danger">
Cette personne n'a pas encore payé sa participation.
</div>
<?php } else { ?>
<strong>Tournoi :</strong> <?= $tournament->getName() ?><br />
<strong>Montant :</strong> <?= $payment->getAmount() ?> €<br />
<strong>Moyen de paiement :</strong> <?= PaymentMethod::getTranslatedName($payment->getMethod()) ?><br />
<?php if ($payment->getMethod() == PaymentMethod::SCHOLARSHIP) { ?>
<strong>Notification de bourse :</strong> <a href="/file/<?= $payment->getTransactionInfos() ?>">Télécharger</a><br /><br />
<?php } else { ?>
<strong>Informations sur le paiement :</strong> <?= $payment->getTransactionInfos() ?><br /><br />
<?php }
if ($payment->getValidationStatus() == ValidationStatus::WAITING) { ?>
<div class="alert alert-warning">
Le paiement n'a pas encore été validé.
<form method="POST">
<input type="hidden" name="validate_payment" value=""/>
<div class="form-group row">
<label for="message">Message à adresser au participant :</label>
<textarea class="form-control" id="message" name="message"></textarea>
</div>
<input class="btn btn-primary btn-lg" style="width: 49%;"
type="submit" name="accept" value="Valider le paiement"/>
<input class="btn btn-light btn-lg" style="width: 49%;" type="submit" name="reject"
value="Rejeter le paiement"/>
</form>
<?php if ($payment->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
<div class="alert alert-danger">
Cette personne n'a pas encore payé sa participation.
</div>
<?php } else { ?>
<div class="alert alert-success">
Le paiement a été validé.
</div>
<strong>Tournoi :</strong> <?= $tournament->getName() ?><br />
<strong>Montant :</strong> <?= $payment->getAmount() ?> €<br />
<strong>Moyen de paiement :</strong> <?= PaymentMethod::getTranslatedName($payment->getMethod()) ?><br />
<?php if ($payment->getMethod() == PaymentMethod::SCHOLARSHIP) { ?>
<strong>Notification de bourse :</strong> <a href="/file/<?= $payment->getTransactionInfos() ?>">Télécharger</a><br /><br />
<?php } else { ?>
<strong>Informations sur le paiement :</strong> <?= $payment->getTransactionInfos() ?><br /><br />
<?php }
if ($payment->getValidationStatus() == ValidationStatus::WAITING) { ?>
<div class="alert alert-warning">
Le paiement n'a pas encore été validé.
<form method="POST">
<input type="hidden" name="validate_payment" value=""/>
<div class="form-group row">
<label for="message">Message à adresser au participant :</label>
<textarea class="form-control" id="message" name="message"></textarea>
</div>
<input class="btn btn-primary btn-lg" style="width: 49%;"
type="submit" name="accept" value="Valider le paiement"/>
<input class="btn btn-light btn-lg" style="width: 49%;" type="submit" name="reject"
value="Rejeter le paiement"/>
</form>
</div>
<?php } else { ?>
<div class="alert alert-success">
Le paiement a été validé.
</div>
<?php } ?>
<?php } ?>
<?php } ?>
</div>
</div>
<?php } ?>
<?php } elseif ($user->getDescription() != "") { ?>
<div class="alert alert-info">

View File

@ -198,7 +198,7 @@ if (!$has_error && (isset($my_account) || isset($new_password))) {
</div>
</form>
<?php if (isset($_SESSION["team"]) && $user->getRole() == Role::PARTICIPANT) {
<?php if (isset($_SESSION["team"]) && ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT)) {
$not_validated = $_SESSION["team"]->getValidationStatus() == ValidationStatus::NOT_READY;
?>
<hr/>

View File

@ -82,7 +82,7 @@ require_once "header.php";
<?php } else { ?>
<?php if ($_SESSION["team_validation_status"] == ValidationStatus::NOT_READY) { ?>
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
<!--suppress HtmlUnknownTarget -->
<a href="/mon-equipe/modifier">
<button class="btn btn-secondary btn-lg btn-block">Modifier mon équipe</button>
@ -101,7 +101,7 @@ require_once "header.php";
if ($can_validate) { ?>
<hr />
<form method="post">
<label for="engage">Je m'engage à participer à l'intégralité des Correspondances</label>
<label for="engage">Je m'engage à participer à l'intégralité du TFJM²</label>
<input type="checkbox" name="engage" id="engage" required/>
<div class="alert alert-warning">
<strong>Attention !</strong> Une fois votre équipe validée, vous ne pourrez plus modifier le nom
@ -114,7 +114,8 @@ require_once "header.php";
<hr />
<div class="alert alert-warning">
Pour demander à valider votre équipe, vous devez avoir au moins un encadrant, quatre participants,
choisi un problème et soumis une autorisation de droit à l'image par participant.
choisi un problème et soumis une autorisation de droit à l'image, une fiche sanitaire et une autorisation
parentale (si besoin) par participant.
</div>
<?php } ?>
<?php }