fix: pass enabledAccessTypes from ThesisEditController to edit view

This commit is contained in:
Pontoporeia
2026-04-29 21:34:47 +02:00
parent 885150ea45
commit 5c39e856a3
2 changed files with 7 additions and 3 deletions

View File

@@ -9,6 +9,10 @@
- [x] Update action redirects to point to new pages - [x] Update action redirects to point to new pages
- [x] Update admin nav header (merged 3 items → 2) - [x] Update admin nav header (merged 3 items → 2)
## Bug fixes
- [x] Fix `$enabledAccessTypes` undefined / `array_map()` TypeError on edit page — controller was fetching `getAccessTypes()` instead of `getEnabledFormAccessTypes()` and returning it under the wrong key
## CSS refactor ## CSS refactor
- [x] Move semantic HTML element baseline styles into common.css - [x] Move semantic HTML element baseline styles into common.css

View File

@@ -95,8 +95,8 @@ class ThesisEditController
$finalityTypes = $this->db->getAllFinalityTypes(); $finalityTypes = $this->db->getAllFinalityTypes();
$languages = $this->db->getAllLanguages(); $languages = $this->db->getAllLanguages();
$formatTypes = $this->db->getAllFormatTypes(); $formatTypes = $this->db->getAllFormatTypes();
$licenseTypes = $this->db->getAllLicenseTypes(); $licenseTypes = $this->db->getAllLicenseTypes();
$accessTypes = $this->db->getAccessTypes(); $enabledAccessTypes = $this->db->getEnabledFormAccessTypes();
$rawRow = $this->db->getThesisRawFields($thesisId); $rawRow = $this->db->getThesisRawFields($thesisId);
$currentLicenseId = $rawRow['license_id'] ?? null; $currentLicenseId = $rawRow['license_id'] ?? null;
@@ -120,7 +120,7 @@ class ThesisEditController
'languages' => $languages, 'languages' => $languages,
'formatTypes' => $formatTypes, 'formatTypes' => $formatTypes,
'licenseTypes' => $licenseTypes, 'licenseTypes' => $licenseTypes,
'accessTypes' => $accessTypes, 'enabledAccessTypes' => $enabledAccessTypes,
'currentLicenseId' => $currentLicenseId, 'currentLicenseId' => $currentLicenseId,
'currentAccessTypeId' => $currentAccessTypeId, 'currentAccessTypeId' => $currentAccessTypeId,
'currentContextNote' => $currentContextNote, 'currentContextNote' => $currentContextNote,