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

Nombreux changements mineurs

This commit is contained in:
Yohann
2019-10-04 22:36:23 +02:00
parent 7eba8b542b
commit 57b8f7bdfe
13 changed files with 142 additions and 43 deletions

View File

@ -29,7 +29,7 @@ require_once "header.php";
</div>
<div class="form-group col-md-6">
<label for="trigram">Trigramme :</label>
<label for="trigram">Trigramme (<em>identifiant unique à trois lettres de l'équipe</em>) :</label>
<input class="form-control" type="text" id="trigram" name="trigram"
value="<?php if (isset($new_team)) echo $new_team->trigram ?>" pattern="[A-Z]{3}" maxlength="3" required/>
</div>
@ -46,9 +46,17 @@ require_once "header.php";
</select>
</div>
<label for="allow_other_teams">J'accepte que mes vidéos soient diffusées aux équipes avec lesquelles je vais concourir :</label>
<input type="checkbox" id="allow_other_teams" name="allow_other_teams"
<?= isset($new_team) && $new_team->allow_other_teams ? "checked" : "" ?> required/><br />
<label for="allow_publish">J'accepte qu'Animath diffuse mes vidéos à la fin du tournoi (<em>facultatif</em>) :</label>
<input type="checkbox" id="allow_publish" name="allow_publish"
<?= isset($new_team) && $new_team->allow_publish ? "checked" : "" ?> />
<?= isset($new_team) && $new_team->allow_publish ? "checked" : "" ?> />
<div class="alert alert-info">
Cette dernière option est modifiable à tout moment, et permet à <em>Animath</em> de diffuser les vidéos primées.
</div>
<div class="form-group row">
<input class="btn btn-primary btn-lg btn-block" name="add_team" type="submit" value="Ajouter une équipe"/>

View File

@ -90,40 +90,49 @@
<?php } else { ?>
<div class="alert alert-<?= Phase::getCurrentPhase() == Phase::INSCRIPTION ? "warning" : "success" ?>">
<?= Phase::getTranslatedName(Phase::INSCRIPTION) ?> :
<?= Phase::getTranslatedName(Phase::INSCRIPTION) ?> :
<strong><?= formatDate($CONFIG->getInscriptionDate(), true) ?></strong>
</div>
<div class="alert alert-<?= Phase::getCurrentPhase() < Phase::PHASE1 ? "danger" : (Phase::getCurrentPhase() == Phase::PHASE1 ? "warning" : "success") ?>">
<?= Phase::getTranslatedName(Phase::PHASE1) ?> :
<?= Phase::getTranslatedName(Phase::PHASE1) ?> :
Du <strong><?= formatDate($CONFIG->getStartPhase1Date(), true) ?></strong> au
<strong><?= formatDate($CONFIG->getEndPhase1Date(), true) ?></strong>
</div>
<div class="alert alert-<?= Phase::getCurrentPhase() < Phase::PHASE2 ? "danger" : (Phase::getCurrentPhase() == Phase::PHASE2 ? "warning" : "success") ?>">
<?= Phase::getTranslatedName(Phase::PHASE2) ?> :
<?= Phase::getTranslatedName(Phase::PHASE2) ?> :
Du <strong><?= formatDate($CONFIG->getStartPhase2Date(), true) ?></strong> au
<strong><?= formatDate($CONFIG->getEndPhase2Date(), true) ?></strong>
</div>
<div class="alert alert-<?= Phase::getCurrentPhase() < Phase::PHASE3 ? "danger" : (Phase::getCurrentPhase() == Phase::PHASE3 ? "warning" : "success") ?>">
<?= Phase::getTranslatedName(Phase::PHASE3) ?> :
<?= Phase::getTranslatedName(Phase::PHASE3) ?> :
Du <strong><?= formatDate($CONFIG->getStartPhase3Date(), true) ?></strong> au
<strong><?= formatDate($CONFIG->getEndPhase3Date(), true) ?></strong>
</div>
<div class="alert alert-<?= Phase::getCurrentPhase() < Phase::PHASE4 ? "danger" : (Phase::getCurrentPhase() == Phase::PHASE4 ? "warning" : "success") ?>">
<?= Phase::getTranslatedName(Phase::PHASE4) ?> :
<?= Phase::getTranslatedName(Phase::PHASE4) ?> :
Du <strong><?= formatDate($CONFIG->getStartPhase4Date(), true) ?></strong> au
<strong><?= formatDate($CONFIG->getEndPhase4Date(), true) ?></strong>
</div>
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
<!--suppress HtmlUnknownTarget -->
<a href="/calendrier/modifier">
<button class="btn btn-primary btn-block">Modifier le calendrier</button>
<button class="btn btn-primary btn-lg btn-block">Modifier le calendrier</button>
</a>
<?php }
}
<?php } ?>
<hr/>
<a href="https://correspondances-maths.fr/participer/">
<button class="btn btn-primary btn-lg btn-block">
Comment participer aux Correspondances ?
</button>
</a>
<?php }
require_once "footer.php";

View File

@ -78,6 +78,7 @@
<li class="nav-item active"><a class="nav-link" href="/probleme/2">Problème 2</a></li>
<li class="nav-item active"><a class="nav-link" href="/probleme/3">Problème 3</a></li>
<li class="nav-item active"><a class="nav-link" href="/probleme/4">Problème 4</a></li>
<li class="nav-item active"><a class="nav-link" href="/probleme/0">Équipes sans problème</a></li>
<li class="nav-item active"><a class="nav-link" href="/profils-orphelins">Profils orphelins</a></li>
</ul>
</li>

View File

@ -66,11 +66,13 @@ if (!$has_error) {
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
<div class="alert alert-info">
<strong>Lycée :</strong> <?= $user->getSchool() ?><br/>
<strong>Ville :</strong> <?= $user->getCity() ?><br/>
<strong>Payer :</strong> <?= $user->getCountry() ?><br/>
<strong>Classe :</strong> <?= SchoolClass::getTranslatedName($user->getClass()) ?>
</div>
<?php } elseif ($user->getDescription() != "") { ?>
<div class="alert alert-info">
<strong>Description :</strong> <?= $user->getDescription() ?>
<strong>Activité professionnelle :</strong> <?= $user->getDescription() ?>
</div>
<?php } ?>

View File

@ -11,7 +11,7 @@ require_once "header.php";
if (isset($user) && !$has_error) {
?>
<div class="alert alert-success">
Votre inscription est validée ! Merci désormais de confirmer votre boîte mail pour valider votre adresse.
Vous êtes bien inscrit ! Merci désormais de confirmer votre boîte mail pour valider votre adresse.
</div>
<?php } else if (isset($_SESSION["user_id"])) { ?>
<div class="alert alert-danger">
@ -46,16 +46,18 @@ if (isset($user) && !$has_error) {
</div>
</div>
<div class="alert alert-info">
L'adresse mail sert uniquement à recevoir les informations de déroulement des Correspondances.
</div>
<div class="form-row">
<div class="form-group col-md-12">
<label for="email">E-mail :</label>
<input class="form-control" type="email" id="email" name="email"
value="<?php if (isset($user)) echo $user->email ?>"
required/>
value="<?php if (isset($user)) echo $user->email ?>" required/>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="password">Mot de passe :</label>
@ -73,6 +75,18 @@ if (isset($user) && !$has_error) {
<input class="form-control" type="text" id="school" name="school"
value="<?php if (isset($user)) echo $user->school ?>"/>
</div>
<div class="form-group col-md-6">
<label id="city_label" for="city">Ville de l'établissement :</label>
<input class="form-control" type="text" id="city" name="city"
value="<?php if (isset($user)) echo $user->city ?>"/>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label id="country_label" for="country">Pays :</label>
<input class="form-control" type="text" id="country" name="country"
value="<?php if (isset($user)) echo $user->country; else echo "France" ?>"/>
</div>
<div class="form-group col-md-6">
<label id="class_label" for="class">Classe :</label>
<select id="class" name="class" class="custom-select">
@ -84,13 +98,14 @@ if (isset($user) && !$has_error) {
</div>
<div class="form-group row">
<label id="description_label" for="description">Description :</label>
<label id="description_label" for="description">Activité professionnelle :</label>
<textarea class="form-control" id="description"
name="description"><?php if (isset($user)) echo $user->description ?></textarea>
</div>
<label for="receive_animath_mails">J'accepte de recevoir des mails de la part d'Animath (<em>facultatif</em>) :</label>
<label for="receive_animath_mails">J'accepte dêtre recontacté par l'association <em>Animath</em> au sujet
d'autres activités (<em>facultatif</em>) :</label>
<input type="checkbox" id="receive_animath_mails" name="receive_animath_mails"
<?= isset($user) && $user->receive_animath_mails ? "checked" : "" ?> /><br /><br />
@ -107,6 +122,10 @@ if (isset($user) && !$has_error) {
document.getElementById("school").style.display = "block";
document.getElementById("class_label").style.display = "block";
document.getElementById("class").style.display = "block";
document.getElementById("city_label").style.display = "block";
document.getElementById("city").style.display = "block";
document.getElementById("country_label").style.display = "block";
document.getElementById("country").style.display = "block";
document.getElementById("description_label").style.display = "none";
document.getElementById("description").style.display = "none";
break;
@ -115,6 +134,10 @@ if (isset($user) && !$has_error) {
document.getElementById("school").style.display = "none";
document.getElementById("class_label").style.display = "none";
document.getElementById("class").style.display = "none";
document.getElementById("city_label").style.display = "none";
document.getElementById("city").style.display = "none";
document.getElementById("country_label").style.display = "none";
document.getElementById("country").style.display = "none";
document.getElementById("description_label").style.display = "block";
document.getElementById("description").style.display = "block";
break;

View File

@ -45,9 +45,12 @@ if (!$has_error && (isset($my_account) || isset($new_password))) {
</div>
</div>
<label for="receive_animath_mails">J'accepte de recevoir des mails de la part d'Animath (<em>facultatif</em>) :</label>
<input type="checkbox" id="receive_animath_mails" name="receive_animath_mails"
<?= $user->doReceiveAnimathMails() ? "checked" : "" ?> />
<?php if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?>
<label for="receive_animath_mails">J'accepte d'être recontacté par l'association <em>Animath</em> au sujet
d'autres activités (<em>facultatif</em>) :</label>
<input type="checkbox" id="receive_animath_mails" name="receive_animath_mails"
<?= $user->doReceiveAnimathMails() ? "checked" : "" ?> />
<?php } ?>
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
<div class="form-row">
@ -56,7 +59,19 @@ if (!$has_error && (isset($my_account) || isset($new_password))) {
<input class="form-control" type="text" id="school" name="school"
value="<?= $user->getSchool() ?>"/>
</div>
<div class="form-group col-md-6">
<label id="city_label" for="city">Ville de l'établissement :</label>
<input class="form-control" type="text" id="city" name="city"
value="<?php if (isset($user)) echo $user->getCity() ?>"/>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label id="country_label" for="country">Pays :</label>
<input class="form-control" type="text" id="country" name="country"
value="<?php if (isset($user)) echo $user->getCountry(); else echo "France" ?>"/>
</div>
<div class="form-group col-md-6">
<label id="class_label" for="class">Classe :</label>
<select id="class" name="class" class="custom-select">
@ -73,7 +88,7 @@ if (!$has_error && (isset($my_account) || isset($new_password))) {
<?php } else { ?>
<div class="form-group row">
<label id="description_label" for="description">Description :</label>
<label id="description_label" for="description">Activité professionnelle :</label>
<textarea class="form-control" id="description"
name="description"><?= $user->getDescription() ?></textarea>
</div>
@ -113,7 +128,7 @@ if (!$has_error && (isset($my_account) || isset($new_password))) {
</div>
</form>
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
<?php if (isset($_SESSION["team"]) && $_SESSION["team"]->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
<hr/>
<div class="mt-4 mb-4">
<h1 class="display-5">Autorisation de droit à l'image</h1>

View File

@ -52,8 +52,8 @@ require_once "header.php";
</div>
<div class="alert alert-info">
<!--suppress HtmlUnknownTarget -->
Autorise Animath à diffuser mes vidéos : <?= $team->allowPublish() ? "oui" : "non" ?> (<a
href="/mon-equipe/diffusion-videos">changer</a>)
<strong>Autorise Animath à diffuser mes vidéos à la fin du tournoi :</strong>
<?= $team->allowPublish() ? "oui" : "non" ?> (<a href="/mon-equipe/diffusion-videos">changer</a>)
</div>
<?php if (date("Y-m-d H:i:s") >= $CONFIG->getInscriptionDate() && $team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>

View File

@ -1,12 +1,14 @@
<?php require_once "header.php" ?>
<div class="mt-4 mb-4">
<h2 class="display-3">Problème <?= $problem ?></h2>
<h2 class="display-3">
<?= $problem == 0 ? "Équipes sans problème" : "Problème " . $problem ?>
</h2>
</div>
<hr/>
<h2>Équipes inscrites pour ce problème :</h2>
<h2>Équipes inscrites <?= $problem > 0 ? "pour ce problème" : "sans problème choisi" ?> :</h2>
<table class="table table-striped table-bordered table-hover">
<thead>