From a3953800a4b0e3fb241850c402531305ddf5a091 Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Wed, 8 Jul 2026 13:37:58 +0200 Subject: [PATCH] =?UTF-8?q?Move=20annexes=20checkbox=20from=20Fichiers=20f?= =?UTF-8?q?ieldset=20to=20Dur=C3=A9e=20fieldset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/public/admin/fragments/fichiers.php | 4 ---- app/templates/partials/form/fichiers-fragment.php | 7 ------- app/templates/partials/form/form.php | 11 +++++++++-- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/app/public/admin/fragments/fichiers.php b/app/public/admin/fragments/fichiers.php index a72cdb3..b5c6a63 100644 --- a/app/public/admin/fragments/fichiers.php +++ b/app/public/admin/fragments/fichiers.php @@ -61,10 +61,6 @@ if ($thesisId) { $existingFilesJsonForTfe = $buildQueueFilesJson($currentFiles, 'tfe'); $existingFilesJsonForAnnexe = $buildQueueFilesJson($currentFiles, 'annexe'); - // Load has_annexes flag for the checkbox - $rawRow = $db->getThesisRawFields($thesisId); - $_POST['has_annexes'] = !empty($rawRow['has_annexes']) ? '1' : null; - $_POST['edit_mode'] = '1'; } diff --git a/app/templates/partials/form/fichiers-fragment.php b/app/templates/partials/form/fichiers-fragment.php index aff285e..97551a8 100644 --- a/app/templates/partials/form/fichiers-fragment.php +++ b/app/templates/partials/form/fichiers-fragment.php @@ -185,13 +185,6 @@ $websiteLabel = htmlspecialchars($_POST['website_label'] ?? '');
-
- -
diff --git a/app/templates/partials/form/form.php b/app/templates/partials/form/form.php index 025a701..22f0088 100644 --- a/app/templates/partials/form/form.php +++ b/app/templates/partials/form/form.php @@ -374,7 +374,6 @@ if ($filesMode === 'add'): ?> $_POST['website_url'] = $existingWebsiteUrl; $_POST['website_label'] = $existingWebsiteLabel; $_POST['admin_mode'] = $adminMode ? '1' : '0'; - $_POST['has_annexes'] = $formData['has_annexes'] ?? null; // Preserve FilePond temp files across validation redirects. // Session temp files (uploaded via FilePond before a validation error) @@ -400,7 +399,6 @@ if ($filesMode === 'add'): ?> $_POST['website_label'] = $existingWebsiteLabel; $_POST['admin_mode'] = $adminMode ? '1' : '0'; $_POST['edit_mode'] = '1'; - $_POST['has_annexes'] = $formData['has_annexes'] ?? null; // Build per-queue-type existing-files JSON for FilePond edit mode $existingFilesJsonForCover = $_buildQueueFilesJson($currentFiles ?? [], 'cover'); @@ -456,6 +454,15 @@ if ($filesMode === 'add'): ?>
Optionnel. Vous pouvez indiquer des pages, une durée, ou les deux. + + +
+ +