|
|
@@ -38,9 +38,6 @@ class OtCustomizerController extends SelectedSiteController {
|
|
|
$templateRepository = GeneralUtility::makeInstance(ObjectManager::class)->get(TemplateRepository::class);
|
|
|
$this->view->assign('currentTemplate', $templateRepository->getTemplate($this->currentRootUid));
|
|
|
$this->view->assign('preferences', $templateRepository->getTemplatePreferences($this->currentRootUid));
|
|
|
-
|
|
|
- $args = $this->request->getArguments();
|
|
|
- $this->view->assign('preferencesUpdated', $args['preferencesUpdated']);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -66,6 +63,8 @@ class OtCustomizerController extends SelectedSiteController {
|
|
|
// Clear the site's cache
|
|
|
OtCacheManager::clearSiteCache($this->currentRootUid);
|
|
|
|
|
|
+ $this->addFlashMessage('Le thème a bien été modifié');
|
|
|
+
|
|
|
$this->forward('index');
|
|
|
}
|
|
|
|
|
|
@@ -81,7 +80,10 @@ class OtCustomizerController extends SelectedSiteController {
|
|
|
$prefs['themeColor'] = $args['themeColor'];
|
|
|
}
|
|
|
if (isset($args['displayCarousel'])) {
|
|
|
- $prefs['displayCarousel'] = $args['displayCarousel'];
|
|
|
+ $prefs['displayCarousel'] = $args['displayCarousel'] ? 1 : 0;
|
|
|
+ }
|
|
|
+ if (isset($args['displayBreadcrumb'])) {
|
|
|
+ $prefs['displayBreadcrumb'] = $args['displayBreadcrumb'] ? 1 : 0;
|
|
|
}
|
|
|
|
|
|
// applies the change in the database
|
|
|
@@ -94,17 +96,17 @@ class OtCustomizerController extends SelectedSiteController {
|
|
|
)
|
|
|
)
|
|
|
->set('tx_opentalent_template_preferences', json_encode($prefs))
|
|
|
- ->execute()
|
|
|
- ;
|
|
|
+ ->execute();
|
|
|
|
|
|
// Clear the site's cache
|
|
|
OtCacheManager::clearSiteCache($this->currentRootUid);
|
|
|
|
|
|
+ $this->addFlashMessage('Les préférences ont bien été enregistrées');
|
|
|
+
|
|
|
$this->forward(
|
|
|
'index',
|
|
|
'OtCustomizer',
|
|
|
- 'OtTemplating',
|
|
|
- ['preferencesUpdated'=>'1']
|
|
|
+ 'OtTemplating'
|
|
|
);
|
|
|
}
|
|
|
}
|