diff --git a/server_files/controllers/ajouter_admin.php b/server_files/controllers/ajouter_admin.php index c991f0f..395349c 100644 --- a/server_files/controllers/ajouter_admin.php +++ b/server_files/controllers/ajouter_admin.php @@ -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(); diff --git a/server_files/controllers/ajouter_equipe.php b/server_files/controllers/ajouter_equipe.php index 46d9226..5017c77 100644 --- a/server_files/controllers/ajouter_equipe.php +++ b/server_files/controllers/ajouter_equipe.php @@ -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(); diff --git a/server_files/controllers/connexion.php b/server_files/controllers/connexion.php index 63dfd9c..811abf1 100644 --- a/server_files/controllers/connexion.php +++ b/server_files/controllers/connexion.php @@ -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(); diff --git a/server_files/controllers/inscription.php b/server_files/controllers/inscription.php index 8b4d9af..851909d 100644 --- a/server_files/controllers/inscription.php +++ b/server_files/controllers/inscription.php @@ -3,7 +3,7 @@ $has_error = false; $error_message = null; -if (isset($_POST["submitted"])) { +if (isset($_POST["register"])) { $user = new NewUser($_POST); try { diff --git a/server_files/controllers/mon_compte.php b/server_files/controllers/mon_compte.php index a539efc..a44755b 100644 --- a/server_files/controllers/mon_compte.php +++ b/server_files/controllers/mon_compte.php @@ -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(); diff --git a/server_files/controllers/rejoindre_equipe.php b/server_files/controllers/rejoindre_equipe.php index d926238..4e11071 100644 --- a/server_files/controllers/rejoindre_equipe.php +++ b/server_files/controllers/rejoindre_equipe.php @@ -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(); diff --git a/server_files/views/ajouter_admin.php b/server_files/views/ajouter_admin.php index d4f2ac4..2480cc3 100644 --- a/server_files/views/ajouter_admin.php +++ b/server_files/views/ajouter_admin.php @@ -1,12 +1,13 @@ Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail."; -} ?> +if (isset($admin) && !$has_error) { ?> +