mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-26 08:39:18 +02:00
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).
This commit is contained in:
@@ -177,7 +177,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['csv_file'])) {
|
|||||||
'design et politique du multiple' => 'DPM',
|
'design et politique du multiple' => 'DPM',
|
||||||
'narration spéculative' => 'NS',
|
'narration spéculative' => 'NS',
|
||||||
'pacs' => 'PACS',
|
'pacs' => 'PACS',
|
||||||
'pratique de l''art' => 'PACS',
|
'pratique de l\'art' => 'PACS',
|
||||||
];
|
];
|
||||||
|
|
||||||
// Resolve an AP string (code or full name) → ap_program id.
|
// Resolve an AP string (code or full name) → ap_program id.
|
||||||
|
|||||||
@@ -84,7 +84,6 @@
|
|||||||
// Optional sections
|
// Optional sections
|
||||||
$showContact = false; // Admin: contact visibility controlled by filling 'mail' field in fieldset-tfe-info
|
$showContact = false; // Admin: contact visibility controlled by filling 'mail' field in fieldset-tfe-info
|
||||||
$showBackoffice = true;
|
$showBackoffice = true;
|
||||||
$showPublish = true;
|
|
||||||
|
|
||||||
// Files: edit mode
|
// Files: edit mode
|
||||||
$filesMode = 'edit';
|
$filesMode = 'edit';
|
||||||
|
|||||||
@@ -32,9 +32,9 @@
|
|||||||
* bool $showContact — Contact checkbox fieldset
|
* bool $showContact — Contact checkbox fieldset
|
||||||
* bool $showCoverPreview — cover image preview + remove checkbox
|
* bool $showCoverPreview — cover image preview + remove checkbox
|
||||||
* bool $showExistingFiles — existing thesis files list (sortable, deletable)
|
* 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 $showEmailConfirmation — E-mail de confirmation fieldset
|
||||||
* bool $showPublish — Publication checkbox fieldset
|
|
||||||
* string $helpFn — fn(string $key): string (for help blocks)
|
* string $helpFn — fn(string $key): string (for help blocks)
|
||||||
* string $helpContent — current help block content (for help-block renders)
|
* string $helpContent — current help block content (for help-block renders)
|
||||||
* array $helpBlocks — all help blocks (for intro)
|
* array $helpBlocks — all help blocks (for intro)
|
||||||
@@ -88,7 +88,6 @@ $showExistingFiles = $showExistingFiles ?? false;
|
|||||||
$showBannerPreview = false; // Banners merged into covers — field removed
|
$showBannerPreview = false; // Banners merged into covers — field removed
|
||||||
$showBackoffice = $showBackoffice ?? false;
|
$showBackoffice = $showBackoffice ?? false;
|
||||||
$showEmailConfirmation = $showEmailConfirmation ?? false;
|
$showEmailConfirmation = $showEmailConfirmation ?? false;
|
||||||
$showPublish = $showPublish ?? false;
|
|
||||||
|
|
||||||
$oldFn = $oldFn ?? (function_exists('old') ? 'old' : fn($k, $d = '') => $d);
|
$oldFn = $oldFn ?? (function_exists('old') ? 'old' : fn($k, $d = '') => $d);
|
||||||
$withAutofocusFn = $withAutofocusFn ?? fn($field, $attrs = []) => $attrs;
|
$withAutofocusFn = $withAutofocusFn ?? fn($field, $attrs = []) => $attrs;
|
||||||
@@ -501,6 +500,17 @@ $checkedFormatsForSiteWeb = $checkedFormatsForSiteWeb ?? [];
|
|||||||
placeholder="ton.email@exemple.be">
|
placeholder="ton.email@exemple.be">
|
||||||
<small>Adresse de contact interne (non visible publiquement).</small>
|
<small>Adresse de contact interne (non visible publiquement).</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 8. Publication -->
|
||||||
|
<div class="admin-form-group">
|
||||||
|
<label class="admin-checkbox-label">
|
||||||
|
<input type="checkbox" name="is_published" value="1"
|
||||||
|
<?= !empty($currentRaw["is_published"] ?? false)
|
||||||
|
? "checked"
|
||||||
|
: "" ?>>
|
||||||
|
Publier ce TFE sur le site public
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
@@ -529,22 +539,6 @@ $checkedFormatsForSiteWeb = $checkedFormatsForSiteWeb ?? [];
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ($showPublish): ?>
|
|
||||||
<!-- ═══════════════════ Publication ════════════════════════ -->
|
|
||||||
<fieldset>
|
|
||||||
<legend>Publication</legend>
|
|
||||||
<div>
|
|
||||||
<label class="admin-checkbox-label">
|
|
||||||
<input type="checkbox" name="is_published" value="1"
|
|
||||||
<?= !empty($currentRaw["is_published"] ?? false)
|
|
||||||
? "checked"
|
|
||||||
: "" ?>>
|
|
||||||
Publier ce TFE sur le site public
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<div class="form-footer admin-form-footer">
|
<div class="form-footer admin-form-footer">
|
||||||
<button type="submit" name="go" class="btn btn--primary"><?= $mode === 'edit' ? 'Enregistrer' : 'Soumettre' ?></button>
|
<button type="submit" name="go" class="btn btn--primary"><?= $mode === 'edit' ? 'Enregistrer' : 'Soumettre' ?></button>
|
||||||
<?php if ($mode === 'add' || $mode === 'edit'): ?>
|
<?php if ($mode === 'add' || $mode === 'edit'): ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user