mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 08:09:18 +02:00
- split jury into interne/externe/ULB, - remove president from student form, - add language_autre, - split duration into pages+minutes+annexes, - move licence to degrés d'ouverture with CC2r, - add license_custom, - filter PACS from student AP list, - editable généralités help block, - Libre toggle per settings Fix: - missing comma after cc4r column in schema.sql - remove duplicate form footer from partage template - remove couverture from student files fieldset; add promoteur ULB conditional disable via JS on Approfondi - promoteur ULB: remove 'si applicable', make required when visible
40 lines
1.2 KiB
PHP
40 lines
1.2 KiB
PHP
<?php
|
|
require_once __DIR__ . "/../../bootstrap.php";
|
|
require_once __DIR__ . '/../../src/AdminAuth.php';
|
|
AdminAuth::requireLogin();
|
|
|
|
if (empty($_SESSION['csrf_token'])) {
|
|
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
|
|
}
|
|
|
|
require_once APP_ROOT . '/src/Controllers/ThesisEditController.php';
|
|
|
|
$thesisId = isset($_GET['id']) ? intval($_GET['id']) : 0;
|
|
|
|
if ($thesisId <= 0) {
|
|
die("ID invalide");
|
|
}
|
|
|
|
$autofocusField = App::consumeAutofocus();
|
|
|
|
// Form help blocks for editable généralités
|
|
$helpBlocks = Database::getInstance()->getAllFormHelpBlocks();
|
|
$helpFn = fn(string $key) => $helpBlocks[$key]['content'] ?? '';
|
|
|
|
try {
|
|
$ctrl = ThesisEditController::create();
|
|
$view = $ctrl->load($thesisId);
|
|
extract($view);
|
|
} catch (Exception $e) {
|
|
error_log("Error loading edit page: " . $e->getMessage());
|
|
die("Erreur lors du chargement: " . $e->getMessage());
|
|
}
|
|
|
|
$isAdmin = true; $bodyClass = 'admin-body';
|
|
$extraCss = ['/assets/css/form.css'];
|
|
$extraJs = ['/assets/js/sortable.min.js', '/assets/js/file-upload-queue.js'];
|
|
require_once APP_ROOT . '/templates/head.php';
|
|
include APP_ROOT . '/templates/header.php';
|
|
include APP_ROOT . '/templates/admin/edit.php';
|
|
require_once APP_ROOT . '/templates/admin/footer.php';
|