mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-01-06 00:22:21 +00:00
Suppression des hidden tags "submitted"
This commit is contained in:
parent
b6fd5121e1
commit
8d9eeda153
@ -6,7 +6,7 @@ if (!isset($_SESSION["role"]) || $_SESSION["role"] != Role::ADMIN)
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
||||
if (isset($_POST["submitted"])) {
|
||||
if (isset($_POST["add_admin"])) {
|
||||
$admin = new NewAdmin($_POST);
|
||||
try {
|
||||
$admin->makeVerifications();
|
||||
|
@ -6,7 +6,7 @@ if (!isset($_SESSION["role"]) || ($_SESSION["role"] != Role::PARTICIPANT && $_SE
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
||||
if (isset($_POST["submitted"])) {
|
||||
if (isset($_POST["add_team"])) {
|
||||
$new_team = new NewTeam($_POST);
|
||||
try {
|
||||
$new_team->makeVerifications();
|
||||
|
@ -3,7 +3,7 @@
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
||||
if (isset($_POST["submitted"]) && !isset($_SESSION["user_id"])) {
|
||||
if (isset($_POST["login"]) && !isset($_SESSION["user_id"])) {
|
||||
$logging_in_user = new LoggingInUser($_POST);
|
||||
try {
|
||||
$logging_in_user->makeVerifications();
|
||||
|
@ -3,7 +3,7 @@
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
||||
if (isset($_POST["submitted"])) {
|
||||
if (isset($_POST["register"])) {
|
||||
$user = new NewUser($_POST);
|
||||
|
||||
try {
|
||||
|
@ -9,7 +9,7 @@ $user = $_SESSION["user"];
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
||||
if (isset($_POST["submitted"])) {
|
||||
if (isset($_POST["update_team"])) {
|
||||
$my_account = new MyAccount($_POST);
|
||||
try {
|
||||
$my_account->makeVerifications();
|
||||
|
@ -6,7 +6,7 @@ if (isset($_SESSION["team"]) || !isset($_SESSION["user"]) || ($_SESSION["role"]
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
||||
if (isset($_POST["submitted"])) {
|
||||
if (isset($_POST["join_team"])) {
|
||||
$join_team = new JoinTeam($_POST);
|
||||
try {
|
||||
$join_team->makeVerifications();
|
||||
|
@ -1,12 +1,13 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
|
||||
if (isset($admin) && !$has_error) {
|
||||
echo "<h2>Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail.</h2>";
|
||||
} ?>
|
||||
if (isset($admin) && !$has_error) { ?>
|
||||
<div class="alert alert-success">
|
||||
Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail.
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<form method="POST">
|
||||
<input type="hidden" name="submitted" value="true"/>
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -35,7 +36,7 @@ if (isset($admin) && !$has_error) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input style="width: 100%;" type="submit" value="Ajouter un administrateur"/>
|
||||
<input style="width: 100%;" type="submit" name="add_admin" value="Ajouter un administrateur"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -10,7 +10,6 @@ if (isset($new_team) && !$has_error) { ?>
|
||||
<?php } else { ?>
|
||||
|
||||
<form method="POST">
|
||||
<input type="hidden" name="submitted" value="true" />
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -50,7 +49,7 @@ if (isset($new_team) && !$has_error) { ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input style="width: 100%;" type="submit" value="Ajouter une équipe" />
|
||||
<input style="width: 100%;" type="submit" name="add_team" value="Ajouter une équipe" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -45,7 +45,6 @@ if (isset($_GET["mdp_oublie"])) { ?>
|
||||
<form method="POST" class="jumbotron mt-5">
|
||||
<h1 class="display-4">Connexion</h1>
|
||||
<hr class="mt-2 mb-4"/>
|
||||
<input type="hidden" name="submitted" value="true"/>
|
||||
<div class="form-group">
|
||||
<label for="email">E-mail :</label>
|
||||
<input class="form-control" type="email" id="email" name="email"
|
||||
@ -55,7 +54,7 @@ if (isset($_GET["mdp_oublie"])) { ?>
|
||||
<label for="password">Mot de passe :</label>
|
||||
<input class="form-control" type="password" id="password" name="password"/>
|
||||
</div>
|
||||
<input class="btn btn-primary btn-block" type="submit" value="Se connecter"/>
|
||||
<input class="btn btn-primary btn-block" name="login" type="submit" value="Se connecter"/>
|
||||
</form>
|
||||
<div class="alert">
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
|
@ -24,8 +24,6 @@ if (isset($user) && !$has_error) {
|
||||
<?php } else { ?>
|
||||
|
||||
<form method="POST">
|
||||
<input type="hidden" name="submitted" value="true"/>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="role">Rôle :</label>
|
||||
<select id="role" name="role" onchange="selectRole()" class="custom-select">
|
||||
@ -93,7 +91,7 @@ if (isset($user) && !$has_error) {
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<input class="btn btn-primary btn-lg btn-block" type="submit" value="S'inscrire"/>
|
||||
<input class="btn btn-primary btn-lg btn-block" name="register" type="submit" value="S'inscrire"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
@ -12,7 +12,6 @@ if (!$has_error && (isset($my_account) || isset($new_password))) {
|
||||
<?php } ?>
|
||||
|
||||
<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>
|
||||
@ -61,7 +60,7 @@ if (!$has_error && (isset($my_account) || isset($new_password))) {
|
||||
<td style="text-align: center;" colspan="2"><input type="checkbox" id="receive_animath_mails" name="receive_animath_mails" <?= $user->doReceiveAnimathMails() ? "checked" : "" ?> /> <label for="receive_animath_mails">J'accepte de recevoir des mails de la part d'Animath</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="submit" style="width: 100%" value="Mettre à jour mes données"/></td>
|
||||
<td colspan="2"><input type="submit" style="width: 100%" name="update_team" value="Mettre à jour mes données"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
@ -10,7 +10,6 @@ if (isset($join_team) && !$has_error) { ?>
|
||||
<?php if ($has_error) echo "<h2>Erreur : " . $error_message . "</h2>"; ?>
|
||||
|
||||
<form method="POST">
|
||||
<input type="hidden" name="submitted" value="true" />
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -23,7 +22,7 @@ if (isset($join_team) && !$has_error) { ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input style="width: 100%;" type="submit" value="Rejoindre l'équipe" />
|
||||
<input style="width: 100%;" name="join_team" type="submit" value="Rejoindre l'équipe" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
Loading…
Reference in New Issue
Block a user