mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
feat: add objet field (tfe/thèse/frart) with share-link restriction and site-settings toggles
This commit is contained in:
@@ -127,6 +127,7 @@ class ThesisCreateController
|
||||
'baiu_link' => $data['lien'],
|
||||
'license_id' => $data['licenseId'],
|
||||
'access_type_id' => $data['accessTypeId'],
|
||||
'objet' => $data['objet'],
|
||||
'author_id' => $authorId,
|
||||
]);
|
||||
|
||||
@@ -275,6 +276,10 @@ class ThesisCreateController
|
||||
$accessTypeId = 2; // Interne
|
||||
}
|
||||
|
||||
// Objet — restricted to valid values
|
||||
$validObjet = ['tfe', 'thèse', 'frart'];
|
||||
$objet = in_array($post['objet'] ?? '', $validObjet, true) ? $post['objet'] : 'tfe';
|
||||
|
||||
// External link (optional)
|
||||
$lien = '';
|
||||
if (!empty($post['lien'])) {
|
||||
@@ -298,7 +303,7 @@ class ThesisCreateController
|
||||
'auteurName', 'mail', 'showContact', 'confirmationEmail', 'annee', 'orientationId', 'apProgramId',
|
||||
'finalityId', 'titre', 'subtitle', 'synopsis', 'durationInfo',
|
||||
'juryMembers', 'keywords', 'languageIds', 'formatIds',
|
||||
'licenseId', 'lien', 'accessTypeId'
|
||||
'licenseId', 'lien', 'accessTypeId', 'objet'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user