From bcf683c5c146285516a27ee9944a04863418506f Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Sat, 9 May 2026 18:54:14 +0200 Subject: [PATCH] Merge Publication fieldset's is_published checkbox into Backoffice fieldset Move the is_published checkbox from its own separate Publication fieldset into the Backoffice fieldset (as item #8). This means the publish control is now present in both add and edit admin forms (previously it was only shown in edit mode via $showPublish). --- app/public/admin/index.php | 2 +- app/templates/admin/edit.php | 1 - app/templates/partials/form/form.php | 32 +++++++++++----------------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/app/public/admin/index.php b/app/public/admin/index.php index d5beebd..fe702f0 100644 --- a/app/public/admin/index.php +++ b/app/public/admin/index.php @@ -177,7 +177,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['csv_file'])) { 'design et politique du multiple' => 'DPM', 'narration spéculative' => 'NS', 'pacs' => 'PACS', - 'pratique de l''art' => 'PACS', + 'pratique de l\'art' => 'PACS', ]; // Resolve an AP string (code or full name) → ap_program id. diff --git a/app/templates/admin/edit.php b/app/templates/admin/edit.php index d3cd9e5..22fbbb8 100644 --- a/app/templates/admin/edit.php +++ b/app/templates/admin/edit.php @@ -84,7 +84,6 @@ // Optional sections $showContact = false; // Admin: contact visibility controlled by filling 'mail' field in fieldset-tfe-info $showBackoffice = true; - $showPublish = true; // Files: edit mode $filesMode = 'edit'; diff --git a/app/templates/partials/form/form.php b/app/templates/partials/form/form.php index 1d59d77..c502f74 100644 --- a/app/templates/partials/form/form.php +++ b/app/templates/partials/form/form.php @@ -32,9 +32,9 @@ * bool $showContact — Contact checkbox fieldset * bool $showCoverPreview — cover image preview + remove checkbox * bool $showExistingFiles — existing thesis files list (sortable, deletable) - * bool $showBackoffice — Backoffice fieldset (context_note, jury_points, remarks, baiu_link, exemplaires, contact_interne) + * bool $showBackoffice — Backoffice fieldset (context_note, jury_points, remarks, baiu_link, exemplaires, contact_interne, is_published) * bool $showEmailConfirmation — E-mail de confirmation fieldset - * bool $showPublish — Publication checkbox fieldset + * string $helpFn — fn(string $key): string (for help blocks) * string $helpContent — current help block content (for help-block renders) * array $helpBlocks — all help blocks (for intro) @@ -88,7 +88,6 @@ $showExistingFiles = $showExistingFiles ?? false; $showBannerPreview = false; // Banners merged into covers — field removed $showBackoffice = $showBackoffice ?? false; $showEmailConfirmation = $showEmailConfirmation ?? false; -$showPublish = $showPublish ?? false; $oldFn = $oldFn ?? (function_exists('old') ? 'old' : fn($k, $d = '') => $d); $withAutofocusFn = $withAutofocusFn ?? fn($field, $attrs = []) => $attrs; @@ -501,6 +500,17 @@ $checkedFormatsForSiteWeb = $checkedFormatsForSiteWeb ?? []; placeholder="ton.email@exemple.be"> Adresse de contact interne (non visible publiquement). + + +
+ +
@@ -529,22 +539,6 @@ $checkedFormatsForSiteWeb = $checkedFormatsForSiteWeb ?? []; - - -
- Publication -
- -
-
- -