mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
formulaire: default interne, unpublished, contact toggle, settings section
This commit is contained in:
@@ -91,22 +91,28 @@ class ThesisEditController
|
||||
$currentAccessTypeId = $rawRow['access_type_id'] ?? null;
|
||||
$currentContextNote = $rawRow['context_note'] ?? '';
|
||||
|
||||
// Author contact info (from view)
|
||||
$currentAuthorEmail = $thesis['author_email'] ?? '';
|
||||
$currentAuthorShowContact = (bool)($thesis['author_show_contact'] ?? false);
|
||||
|
||||
return [
|
||||
'thesis' => $thesis,
|
||||
'currentLanguages' => $currentLanguages,
|
||||
'currentFormats' => $currentFormats,
|
||||
'jury' => $jury,
|
||||
'orientations' => $orientations,
|
||||
'apPrograms' => $apPrograms,
|
||||
'finalityTypes' => $finalityTypes,
|
||||
'languages' => $languages,
|
||||
'formatTypes' => $formatTypes,
|
||||
'licenseTypes' => $licenseTypes,
|
||||
'accessTypes' => $accessTypes,
|
||||
'currentLicenseId' => $currentLicenseId,
|
||||
'currentAccessTypeId' => $currentAccessTypeId,
|
||||
'currentContextNote' => $currentContextNote,
|
||||
'pageTitle' => 'Éditer TFE - ' . htmlspecialchars($thesis['title']),
|
||||
'thesis' => $thesis,
|
||||
'currentLanguages' => $currentLanguages,
|
||||
'currentFormats' => $currentFormats,
|
||||
'jury' => $jury,
|
||||
'orientations' => $orientations,
|
||||
'apPrograms' => $apPrograms,
|
||||
'finalityTypes' => $finalityTypes,
|
||||
'languages' => $languages,
|
||||
'formatTypes' => $formatTypes,
|
||||
'licenseTypes' => $licenseTypes,
|
||||
'accessTypes' => $accessTypes,
|
||||
'currentLicenseId' => $currentLicenseId,
|
||||
'currentAccessTypeId' => $currentAccessTypeId,
|
||||
'currentContextNote' => $currentContextNote,
|
||||
'currentAuthorEmail' => $currentAuthorEmail,
|
||||
'currentAuthorShowContact' => $currentAuthorShowContact,
|
||||
'pageTitle' => 'Éditer TFE - ' . htmlspecialchars($thesis['title']),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -162,13 +168,15 @@ class ThesisEditController
|
||||
|
||||
// ── 2. Authors ────────────────────────────────────────────────────
|
||||
$authorsRaw = trim($post['auteurice'] ?? '');
|
||||
$showContact = !empty($post['contact_public']);
|
||||
$authorEntries = [];
|
||||
if ($authorsRaw !== '') {
|
||||
foreach (array_map('trim', explode(',', $authorsRaw)) as $i => $name) {
|
||||
if ($name !== '') {
|
||||
$authorEntries[] = [
|
||||
'name' => $name,
|
||||
'email' => $i === 0 ? ($post['mail'] ?? null) : null,
|
||||
'name' => $name,
|
||||
'email' => $i === 0 ? ($post['mail'] ?? null) : null,
|
||||
'show_contact' => $i === 0 ? $showContact : false,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user