1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-24 13:48:45 +02:00

Design inscription, connexion, calendrier

This commit is contained in:
galaxyoyo
2019-09-24 12:04:42 +02:00
parent e878854861
commit 5724a6c98e
6 changed files with 269 additions and 276 deletions

View File

@ -1,74 +1,100 @@
<?php
require_once "header.php";
?>
<div class="mt-4 mb-4">
<h1 class="display-4">Formulaire d'inscription</h1>
</div>
<?php
/** @var NewUser $user */
if (isset($user) && !$has_error) {
?>
Votre inscription est validée ! Merci désormais de confirmer votre boîte mail pour valider votre adresse.
<div class="alert alert-success">
Votre inscription est validée ! Merci désormais de confirmer votre boîte mail pour valider votre adresse.
</div>
<?php } else if (isset($_SESSION["user_id"])) { ?>
<h2>Vous êtes déjà connecté !</h2>
<div class="alert alert-danger">
Vous êtes déjà connecté !
</div>
<?php } elseif(date("Y-m-d H:i:s") >= $CONFIG->getInscriptionDate()) { ?>
<h2>La date limite d'inscription est dépassée.</h2>
<div class="alert alert-danger">
La date limite d'inscription est dépassée.
</div>
<?php } else { ?>
<form method="POST">
<input type="hidden" name="submitted" value="true"/>
<table style="width: 100%;">
<tr>
<td style="width: 30%;"><label for="email">E-mail :</label></td>
<td style="width: 70%;"><input style="width: 100%;" type="email" id="email" name="email"
value="<?php if (isset($user)) echo $user->email ?>"
required/></td>
</tr>
<tr>
<td><label for="password">Mot de passe :</label></td>
<td><input style="width: 100%;" type="password" id="password" name="password" required/></td>
</tr>
<tr>
<td><label for="confirm_password">Confirmer le mot de passe :</label></td>
<td><input style="width: 100%;" type="password" id="confirm_password" name="confirm_password" required/>
</td>
</tr>
<tr>
<td><label for="surname">Nom :</label></td>
<td><input style="width: 100%;" type="text" id="surname" name="surname"
value="<?php if (isset($user)) echo $user->surname ?>" required/></td>
</tr>
<tr>
<td><label for="first_name">Prénom :</label></td>
<td><input style="width: 100%;" type="text" id="first_name" name="first_name"
value="<?php if (isset($user)) echo $user->first_name ?>" required/></td>
</tr>
<tr>
<td><label for="role">Rôle :</label></td>
<td><select style="width: 100%;" id="role" name="role" onchange="selectRole()">
<option value="participant"><?= Role::getTranslatedName(Role::PARTICIPANT) ?></option>
<option value="encadrant"><?= Role::getTranslatedName(Role::ENCADRANT) ?></option>
</select></td>
</tr>
<tr>
<td><label id="school_label" for="school">Établissement dans lequel l'élève étudie :</label></td>
<td><input style="width: 100%;" type="text" id="school" name="school"
value="<?php if (isset($user)) echo $user->school ?>"/></td>
</tr>
<tr>
<td><label id="class_label" for="class">Classe :</label></td>
<td><select style="width: 100%;" id="class" name="class">
<option value="terminale"><?= SchoolClass::getTranslatedName(SchoolClass::TERMINALE) ?></option>
<option value="premiere"><?= SchoolClass::getTranslatedName(SchoolClass::PREMIERE) ?></option>
<option value="seconde"><?= SchoolClass::getTranslatedName(SchoolClass::SECONDE) ?></option>
</select></td>
</tr>
<tr>
<td><label id="description_label" for="description">Description :</label></td>
<td><textarea style="width: 100%;" id="description"
name="description"><?php if (isset($user)) echo $user->description ?></textarea>
</td>
</tr>
<tr>
<td colspan="2"><input style="width: 100%;" type="submit" value="S'inscrire"/></td>
</tr>
</table>
<div class="form-group row">
<label for="role">Rôle :</label>
<select id="role" name="role" onchange="selectRole()" class="custom-select">
<option value="participant"><?= Role::getTranslatedName(Role::PARTICIPANT) ?></option>
<option value="encadrant"><?= Role::getTranslatedName(Role::ENCADRANT) ?></option>
</select>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="surname">Nom :</label>
<input class="form-control" type="text" id="surname" name="surname"
value="<?php if (isset($user)) echo $user->surname ?>" required/>
</div>
<div class="form-group col-md-6">
<label for="first_name">Prénom :</label>
<input class="form-control" type="text" id="first_name" name="first_name"
value="<?php if (isset($user)) echo $user->first_name ?>" required/>
</div>
</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/>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="password">Mot de passe :</label>
<input class="form-control" type="password" id="password" name="password" required/>
</div>
<div class="form-group col-md-6">
<label for="confirm_password">Confirmer le mot de passe :</label>
<input class="form-control" type="password" id="confirm_password" name="confirm_password" required/>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label id="school_label" for="school">Établissement dans lequel l'élève étudie :</label>
<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="class_label" for="class">Classe :</label>
<select id="class" name="class" class="custom-select">
<option value="terminale"><?= SchoolClass::getTranslatedName(SchoolClass::TERMINALE) ?></option>
<option value="premiere"><?= SchoolClass::getTranslatedName(SchoolClass::PREMIERE) ?></option>
<option value="seconde"><?= SchoolClass::getTranslatedName(SchoolClass::SECONDE) ?></option>
</select>
</div>
</div>
<div class="form-group row">
<label id="description_label" for="description">Description :</label>
<textarea class="form-control" id="description"
name="description"><?php if (isset($user)) echo $user->description ?></textarea>
</div>
<div class="form-group row">
<input class="btn btn-primary btn-lg btn-block" type="submit" value="S'inscrire"/>
</div>
</form>
<script>