admin: replace header 'Ajouter un TFE' nav link with toolbar button

This commit is contained in:
Pontoporeia
2026-04-16 11:50:59 +02:00
parent c4705f6265
commit 150099dc3c
12 changed files with 1166 additions and 76 deletions

View File

@@ -9,8 +9,6 @@ ini_set('error_log', 'error.log');
AdminAuth::requireLogin();
$studentMode = isset($_POST['student_mode']) && $_POST['student_mode'] === '1';
// Verify CSRF token
if (!isset($_POST['csrf_token'], $_SESSION['csrf_token'])
|| !hash_equals($_SESSION['csrf_token'], $_POST['csrf_token'])) {
@@ -28,10 +26,6 @@ try {
unset($_SESSION['csrf_token']);
$redirect = '../thanks.php?id=' . urlencode($thesisId);
if ($studentMode) {
$redirect .= '&mode=student';
}
header('Location: ' . $redirect);
exit();
@@ -42,9 +36,6 @@ try {
$_SESSION['form_data'] = $_POST;
$redirect = '../add.php';
if ($studentMode) {
$redirect .= '?mode=student';
}
$autofocusField = ThesisCreateController::autofocusFieldForError($e->getMessage());
if ($autofocusField !== null) {