mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 15:21:22 +02:00
refactor: combined duration (pages + minutes), has_annexes checkbox, remove Mo
- Remove Mo option from duration, keep only pages and minutes - Redesign duration fieldset: separate Pages input + Durée h:m inputs, both can be set together - Fix minutes input visibility: wider inputs (6ch), proper CSS layout - Add has_annexes checkbox to fichiers fragment + DB column + controllers - Display duration on admin backoffice recap page - Display duration on public partage recap page - Update public TFE page for new combined duration format - Migration 041: add duration_pages, duration_minutes, has_annexes columns; migrate data; recreate views
This commit is contained in:
@@ -45,6 +45,9 @@ $formData = array_merge($formData, [
|
||||
'lien' => $thesis['baiu_link'] ?? '',
|
||||
'contact_public' => $contactPublic ?? false,
|
||||
'contact_interne' => $contactInterne ?? '',
|
||||
'duration_pages' => $currentRaw['duration_pages'] ?? null,
|
||||
'duration_minutes' => $currentRaw['duration_minutes'] ?? null,
|
||||
'has_annexes' => $currentRaw['has_annexes'] ?? false,
|
||||
]);
|
||||
|
||||
// Build jury arrays
|
||||
@@ -144,8 +147,7 @@ extract(FormBootstrap::adminFormVariables(
|
||||
'currentFiles' => $currentFiles ?? [],
|
||||
'currentContextNote' => $currentContextNote ?? null,
|
||||
'currentContactVisible' => $currentContactVisible ?? null,
|
||||
'currentDurationValue' => $currentDurationValue ?? null,
|
||||
'currentDurationUnit' => $currentDurationUnit ?? 'pages',
|
||||
|
||||
'contactInterne' => $contactInterne ?? null,
|
||||
'contactPublic' => $contactPublic ?? false,
|
||||
'showCoverPreview' => true,
|
||||
@@ -161,8 +163,9 @@ $formData['license_custom'] = $currentRaw['license_custom'] ?? '';
|
||||
$formData['cc2r'] = $currentRaw['cc2r'] ?? false;
|
||||
|
||||
// Duration variables for the form template
|
||||
$durationValue = $currentDurationValue ?? null;
|
||||
$durationUnit = $currentDurationUnit ?? 'pages';
|
||||
$durationPages = $currentRaw['duration_pages'] ?? null;
|
||||
$durationMins = $currentRaw['duration_minutes'] ?? null;
|
||||
$hasAnnexes = $currentRaw['has_annexes'] ?? false;
|
||||
|
||||
// Asset arrays and page chrome
|
||||
$isAdmin = true;
|
||||
|
||||
@@ -61,6 +61,10 @@ 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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user