1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-01-07 14:22:22 +00:00

Suppression des hidden tags "submitted"

This commit is contained in:
galaxyoyo 2019-09-24 23:18:32 +02:00
parent b6fd5121e1
commit 8d9eeda153
12 changed files with 17 additions and 22 deletions

View File

@ -6,7 +6,7 @@ if (!isset($_SESSION["role"]) || $_SESSION["role"] != Role::ADMIN)
$has_error = false; $has_error = false;
$error_message = null; $error_message = null;
if (isset($_POST["submitted"])) { if (isset($_POST["add_admin"])) {
$admin = new NewAdmin($_POST); $admin = new NewAdmin($_POST);
try { try {
$admin->makeVerifications(); $admin->makeVerifications();

View File

@ -6,7 +6,7 @@ if (!isset($_SESSION["role"]) || ($_SESSION["role"] != Role::PARTICIPANT && $_SE
$has_error = false; $has_error = false;
$error_message = null; $error_message = null;
if (isset($_POST["submitted"])) { if (isset($_POST["add_team"])) {
$new_team = new NewTeam($_POST); $new_team = new NewTeam($_POST);
try { try {
$new_team->makeVerifications(); $new_team->makeVerifications();

View File

@ -3,7 +3,7 @@
$has_error = false; $has_error = false;
$error_message = null; $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); $logging_in_user = new LoggingInUser($_POST);
try { try {
$logging_in_user->makeVerifications(); $logging_in_user->makeVerifications();

View File

@ -3,7 +3,7 @@
$has_error = false; $has_error = false;
$error_message = null; $error_message = null;
if (isset($_POST["submitted"])) { if (isset($_POST["register"])) {
$user = new NewUser($_POST); $user = new NewUser($_POST);
try { try {

View File

@ -9,7 +9,7 @@ $user = $_SESSION["user"];
$has_error = false; $has_error = false;
$error_message = null; $error_message = null;
if (isset($_POST["submitted"])) { if (isset($_POST["update_team"])) {
$my_account = new MyAccount($_POST); $my_account = new MyAccount($_POST);
try { try {
$my_account->makeVerifications(); $my_account->makeVerifications();

View File

@ -6,7 +6,7 @@ if (isset($_SESSION["team"]) || !isset($_SESSION["user"]) || ($_SESSION["role"]
$has_error = false; $has_error = false;
$error_message = null; $error_message = null;
if (isset($_POST["submitted"])) { if (isset($_POST["join_team"])) {
$join_team = new JoinTeam($_POST); $join_team = new JoinTeam($_POST);
try { try {
$join_team->makeVerifications(); $join_team->makeVerifications();

View File

@ -1,12 +1,13 @@
<?php <?php
require_once "header.php"; require_once "header.php";
if (isset($admin) && !$has_error) { if (isset($admin) && !$has_error) { ?>
echo "<h2>Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail.</h2>"; <div class="alert alert-success">
} ?> Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail.
</div>
<?php } ?>
<form method="POST"> <form method="POST">
<input type="hidden" name="submitted" value="true"/>
<table style="width: 100%;"> <table style="width: 100%;">
<tbody> <tbody>
<tr> <tr>
@ -35,7 +36,7 @@ if (isset($admin) && !$has_error) {
</tr> </tr>
<tr> <tr>
<td colspan="2"> <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> </td>
</tr> </tr>
</tbody> </tbody>

View File

@ -10,7 +10,6 @@ if (isset($new_team) && !$has_error) { ?>
<?php } else { ?> <?php } else { ?>
<form method="POST"> <form method="POST">
<input type="hidden" name="submitted" value="true" />
<table style="width: 100%;"> <table style="width: 100%;">
<tbody> <tbody>
<tr> <tr>
@ -50,7 +49,7 @@ if (isset($new_team) && !$has_error) { ?>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <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> </td>
</tr> </tr>
</tbody> </tbody>

View File

@ -45,7 +45,6 @@ if (isset($_GET["mdp_oublie"])) { ?>
<form method="POST" class="jumbotron mt-5"> <form method="POST" class="jumbotron mt-5">
<h1 class="display-4">Connexion</h1> <h1 class="display-4">Connexion</h1>
<hr class="mt-2 mb-4"/> <hr class="mt-2 mb-4"/>
<input type="hidden" name="submitted" value="true"/>
<div class="form-group"> <div class="form-group">
<label for="email">E-mail :</label> <label for="email">E-mail :</label>
<input class="form-control" type="email" id="email" name="email" <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> <label for="password">Mot de passe :</label>
<input class="form-control" type="password" id="password" name="password"/> <input class="form-control" type="password" id="password" name="password"/>
</div> </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> </form>
<div class="alert"> <div class="alert">
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->

View File

@ -24,8 +24,6 @@ if (isset($user) && !$has_error) {
<?php } else { ?> <?php } else { ?>
<form method="POST"> <form method="POST">
<input type="hidden" name="submitted" value="true"/>
<div class="form-group row"> <div class="form-group row">
<label for="role">Rôle :</label> <label for="role">Rôle :</label>
<select id="role" name="role" onchange="selectRole()" class="custom-select"> <select id="role" name="role" onchange="selectRole()" class="custom-select">
@ -93,7 +91,7 @@ if (isset($user) && !$has_error) {
</div> </div>
<div class="form-group row"> <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> </div>
</form> </form>

View File

@ -12,7 +12,6 @@ if (!$has_error && (isset($my_account) || isset($new_password))) {
<?php } ?> <?php } ?>
<form method="POST"> <form method="POST">
<input type="hidden" name="submitted" value="true"/>
<table style="width: 100%"> <table style="width: 100%">
<tr> <tr>
<td style="width: 30%"><label for="email">E-mail :</label></td> <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> <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>
<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> </tr>
</table> </table>
</form> </form>

View File

@ -10,7 +10,6 @@ if (isset($join_team) && !$has_error) { ?>
<?php if ($has_error) echo "<h2>Erreur : " . $error_message . "</h2>"; ?> <?php if ($has_error) echo "<h2>Erreur : " . $error_message . "</h2>"; ?>
<form method="POST"> <form method="POST">
<input type="hidden" name="submitted" value="true" />
<table style="width: 100%;"> <table style="width: 100%;">
<tbody> <tbody>
<tr> <tr>
@ -23,7 +22,7 @@ if (isset($join_team) && !$has_error) { ?>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <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> </td>
</tr> </tr>
</tbody> </tbody>