Commit f5057294 authored by Stefan Galinski's avatar Stefan Galinski 🎮
Browse files

Merge branch 'feature_TYPO3v10Compatibility' into 'master'

[FEATURE] TYPO3 10 Compatibility

Closes #109, #99, #78, #91, #104, #93, and #106

See merge request !3
parents 252b03c6 804818d6
......@@ -31,11 +31,13 @@ use SGalinski\SgCookieOptin\Service\LicensingService;
use SGalinski\SgCookieOptin\Service\MinificationService;
use SGalinski\SgCookieOptin\Service\TemplateService;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\DatabaseConnection;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction;
use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Site\SiteFinder;
use TYPO3\CMS\Core\TimeTracker\NullTimeTracker;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
......@@ -118,24 +120,23 @@ class GenerateFilesAfterTcaSave {
}
$folderName = str_replace('#PID#', $siteRoot, $folder . self::FOLDER_SITEROOT);
$sitePath = defined('PATH_site') ? PATH_site : Environment::getPublicPath() . '/';
// First remove the folder with all files and then create it again. So no data artifacts are kept.
GeneralUtility::rmdir(PATH_site . $folderName, TRUE);
GeneralUtility::mkdir_deep(PATH_site . $folderName);
GeneralUtility::fixPermissions(PATH_site . $folder, TRUE);
GeneralUtility::rmdir($sitePath . $folderName, TRUE);
GeneralUtility::mkdir_deep($sitePath . $folderName);
GeneralUtility::fixPermissions($sitePath . $folder, TRUE);
$currentVersion = VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
/** @var TypoScriptFrontendController $typoScriptFrontendController */
$originalTSFE = $typoScriptFrontendController = $GLOBALS['TSFE'];
if (!($typoScriptFrontendController instanceof TypoScriptFrontendController)) {
$typoScriptFrontendController = $GLOBALS['TSFE'] = new TypoScriptFrontendController(
$GLOBALS['TYPO3_CONF_VARS'], $siteRoot, 0
);
}
if ($currentVersion < 9000000) {
/** @var TypoScriptFrontendController $typoScriptFrontendController */
$originalTSFE = $typoScriptFrontendController = $GLOBALS['TSFE'];
if (!($typoScriptFrontendController instanceof TypoScriptFrontendController)) {
$typoScriptFrontendController = $GLOBALS['TSFE'] = new TypoScriptFrontendController(
$GLOBALS['TYPO3_CONF_VARS'], $siteRoot, 0
);
}
// required in order to generate the menu links later on
if ($currentVersion >= 9000000) {
$typoScriptFrontendController->settingLanguage();
} else {
// required in order to generate the menu links later on
if (!is_object($GLOBALS['TT'])) {
$GLOBALS['TT'] = new NullTimeTracker();
}
......@@ -172,6 +173,8 @@ class GenerateFilesAfterTcaSave {
'color_box' => $fullData['color_box'],
'color_headline' => $fullData['color_headline'],
'color_text' => $fullData['color_text'],
'color_confirmation_background' => $fullData['color_confirmation_background'],
'color_confirmation_text' => $fullData['color_confirmation_text'],
'color_checkbox' => $fullData['color_checkbox'],
'color_checkbox_required' => $fullData['color_checkbox_required'],
'color_button_all' => $fullData['color_button_all'],
......@@ -237,7 +240,7 @@ class GenerateFilesAfterTcaSave {
$this->createJsonFile($folderName, $fullData, $translatedFullData, $cssData, $minifyFiles, $languageUid);
}
GeneralUtility::fixPermissions(PATH_site . $folder, TRUE);
GeneralUtility::fixPermissions($sitePath . $folder, TRUE);
// reset the TSFE to it's previous state to not influence remaining code
$GLOBALS['TSFE'] = $originalTSFE;
......@@ -408,8 +411,9 @@ class GenerateFilesAfterTcaSave {
* @return void
*/
protected function createCSSFile(array $data, $folder, array $cssData, $minifyFile = TRUE) {
$sitePath = defined('PATH_site') ? PATH_site : Environment::getPublicPath() . '/';
$content = '/* Base styles: ' . self::TEMPLATE_STYLE_SHEET_NAME . " */\n\n" .
file_get_contents(PATH_site . self::TEMPLATE_STYLE_SHEET_PATH . self::TEMPLATE_STYLE_SHEET_NAME);
file_get_contents($sitePath . self::TEMPLATE_STYLE_SHEET_PATH . self::TEMPLATE_STYLE_SHEET_NAME);
$templateService = GeneralUtility::makeInstance(TemplateService::class);
$content .= " \n\n" . $templateService->getCSSContent(TemplateService::TYPE_TEMPLATE, $data['template_selection']);
......@@ -431,7 +435,7 @@ class GenerateFilesAfterTcaSave {
$data[] = $value;
}
$file = PATH_site . $folder . self::TEMPLATE_STYLE_SHEET_NAME;
$file = $sitePath . $folder . self::TEMPLATE_STYLE_SHEET_NAME;
file_put_contents($file, str_replace($keys, $data, $content));
if ($minifyFile) {
......@@ -525,7 +529,8 @@ class GenerateFilesAfterTcaSave {
}
$file = $folder . $groupName . '-' . $languageUid . '.js';
$groupFile = PATH_site . $file;
$sitePath = defined('PATH_site') ? PATH_site : Environment::getPublicPath() . '/';
$groupFile = $sitePath . $file;
file_put_contents($groupFile, $content);
if ($minifyFile) {
......@@ -546,8 +551,9 @@ class GenerateFilesAfterTcaSave {
* @return void
*/
protected function createJavaScriptFile($folder, $minifyFile = TRUE) {
$file = PATH_site . $folder . self::TEMPLATE_JAVA_SCRIPT_NAME;
copy(PATH_site . self::TEMPLATE_JAVA_SCRIPT_PATH . self::TEMPLATE_JAVA_SCRIPT_NAME, $file);
$sitePath = defined('PATH_site') ? PATH_site : Environment::getPublicPath() . '/';
$file = $sitePath . $folder . self::TEMPLATE_JAVA_SCRIPT_NAME;
copy($sitePath . self::TEMPLATE_JAVA_SCRIPT_PATH . self::TEMPLATE_JAVA_SCRIPT_NAME, $file);
if ($minifyFile) {
$minificationService = GeneralUtility::makeInstance(MinificationService::class);
......@@ -697,21 +703,32 @@ class GenerateFilesAfterTcaSave {
$footerLinks = [];
$index = 0;
$currentVersion = VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$contentObject = $objectManager->get(ContentObjectRenderer::class);
foreach ($navigationEntries as $pageData) {
try {
$footerLinks[$index] = [
'url' => $contentObject->getTypoLink_URL($pageData['uid'], '&disableOptIn=1&L=' . $languageUid),
'name' => $contentObject->crop($pageData['title'], 35 . '|...|0'),
'uid' => $pageData['uid'],
'index' => $index,
];
++$index;
} catch (\Error $exception) {
// Occurs on the first creation of the translation.
continue;
$uid = $pageData['uid'];
if ($currentVersion >= 9000000) {
$site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($uid);
$url = (string) $site->getRouter()->generateUri($uid, ['disableOptIn' => 1, 'L' => $languageUid]);
$title = $pageData['title'];
$name = strlen($title) > 35 ? substr($title, 0, 35) . '...' : $title;
} else {
try {
$url = $contentObject->getTypoLink_URL($uid, '&disableOptIn=1&L=' . $languageUid);
$name = $contentObject->crop($pageData['title'], 35 . '|...|0');
} catch (\Error $exception) {
// Occurs on the first creation of the translation.
continue;
}
}
$footerLinks[$index] = [
'url' => $url,
'name' => $name,
'uid' => $uid,
'index' => $index,
];
++$index;
}
$settings = [
......@@ -719,6 +736,7 @@ class GenerateFilesAfterTcaSave {
'banner_position' => (int) $translatedData['banner_position'],
'banner_show_settings_button' => (boolean) $translatedData['banner_show_settings_button'],
'cookie_lifetime' => (int) $translatedData['cookie_lifetime'],
'session_only_essential_cookies' => (boolean) $translatedData['session_only_essential_cookies'],
'iframe_enabled' => (boolean) $translatedData['iframe_enabled'],
'minify_generated_data' => (boolean) $translatedData['minify_generated_data'],
'show_button_close' => (boolean) $translatedData['show_button_close'],
......@@ -746,6 +764,7 @@ class GenerateFilesAfterTcaSave {
'banner_button_accept_text' => $translatedData['banner_button_accept_text'],
'banner_button_settings_text' => $translatedData['banner_button_settings_text'],
'banner_description' => $translatedData['banner_description'],
'save_confirmation_text' => $translatedData['save_confirmation_text'],
];
$jsonDataArray = [
......@@ -797,7 +816,8 @@ class GenerateFilesAfterTcaSave {
],
];
$file = PATH_site . $folder . str_replace('#LANG#', $translatedData['sys_language_uid'], self::TEMPLATE_JSON_NAME);
$sitePath = defined('PATH_site') ? PATH_site : Environment::getPublicPath() . '/';
$file = $sitePath . $folder . str_replace('#LANG#', $translatedData['sys_language_uid'], self::TEMPLATE_JSON_NAME);
file_put_contents($file, json_encode($jsonDataArray, JSON_PRETTY_PRINT));
GeneralUtility::fixPermissions($file);
}
......
......@@ -34,9 +34,14 @@ use TYPO3\CMS\Core\Utility\VersionNumberUtility;
class ExtensionSettingsService {
const SETTING_LICENSE = 'key';
const SETTING_FOLDER = 'folder';
const SETTING_HIDE_MODULE_IN_PRODUCTION_CONTEXT = 'hideModuleInProductionContext';
/**
* @var array Default settings mapped to constants.
*/
protected static $defaultValueMap = [
self::SETTING_FOLDER => 'fileadmin/sg_cookie_optin/',
self::SETTING_HIDE_MODULE_IN_PRODUCTION_CONTEXT => FALSE,
];
/**
......@@ -82,6 +87,10 @@ class ExtensionSettingsService {
protected static function postProcessSetting($value, $settingKey) {
if ($settingKey === self::SETTING_FOLDER) {
$value = trim($value, " \t\n\r\0\x0B\/") . '/';
if (strpos($value, 'EXT:') === 0) {
$value = 'typo3conf/ext/' . substr($value, 4);
}
}
return $value;
......
......@@ -26,6 +26,7 @@ namespace SGalinski\SgCookieOptin\Service;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Registry;
......@@ -140,7 +141,8 @@ class LicensingService {
return;
}
GeneralUtility::rmdir(PATH_site . $folder, TRUE);
$sitePath = defined('PATH_site') ? PATH_site : Environment::getPublicPath() . '/';
GeneralUtility::rmdir($sitePath . $folder, TRUE);
}
/**
......
......@@ -28,7 +28,11 @@ namespace SGalinski\SgCookieOptin\UserFunction;
use SGalinski\SgCookieOptin\Service\ExtensionSettingsService;
use SGalinski\SgCookieOptin\Service\LicensingService;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Context\LanguageAspect;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
/**
......@@ -66,30 +70,31 @@ class AddCookieOptinJsAndCss implements SingletonInterface {
}
$file = $folder . 'siteroot-' . $rootPageId . '/' . 'cookieOptin.js';
if (file_exists(PATH_site . $file)) {
$sitePath = defined('PATH_site') ? PATH_site : Environment::getPublicPath() . '/';
if (file_exists($sitePath . $file)) {
$jsonFile = $folder . 'siteroot-' . $rootPageId . '/' . 'cookieOptinData_' .
$this->getLanguage() . '.json';
if (!file_exists(PATH_site . $jsonFile)) {
if (!file_exists($sitePath . $jsonFile)) {
$jsonFile = $folder . 'siteroot-' . $rootPageId . '/' . 'cookieOptinData_0.json';
if (!file_exists(PATH_site . $jsonFile)) {
if (!file_exists($sitePath . $jsonFile)) {
return '';
}
}
return '<script id="cookieOptinData" type="application/json">' . file_get_contents(PATH_site . $jsonFile) .
return '<script id="cookieOptinData" type="application/json">' . file_get_contents($sitePath . $jsonFile) .
'</script><script src="/' . $file . '" type="text/javascript" data-ignore="1"></script>';
} {
// Old including from version 2.X.X @todo remove in version 4.X.X
$file = $folder . 'siteroot-' . $rootPageId . '/' . 'cookieOptin_' .
$this->getLanguage() . '_v2.js';
if (!file_exists(PATH_site . $file)) {
if (!file_exists($sitePath . $file)) {
$file = $folder . 'siteroot-' . $rootPageId . '/' . 'cookieOptin_0_v2.js';
if (!file_exists(PATH_site . $file)) {
if (!file_exists($sitePath . $file)) {
return '';
}
}
$cacheBuster = filemtime(PATH_site . $file);
$cacheBuster = filemtime($sitePath . $file);
if (!$cacheBuster) {
$cacheBuster = '';
}
......@@ -119,11 +124,12 @@ class AddCookieOptinJsAndCss implements SingletonInterface {
}
$file = $folder . 'siteroot-' . $rootPageId . '/cookieOptin.css';
if (!file_exists(PATH_site . $file)) {
$sitePath = defined('PATH_site') ? PATH_site : Environment::getPublicPath() . '/';
if (!file_exists($sitePath . $file)) {
return '';
}
$cacheBuster = filemtime(PATH_site . $file);
$cacheBuster = filemtime($sitePath . $file);
if (!$cacheBuster) {
$cacheBuster = '';
}
......@@ -168,8 +174,15 @@ class AddCookieOptinJsAndCss implements SingletonInterface {
* @return int
*/
protected function getLanguage() {
/** @var TypoScriptFrontendController $typoScriptFrontendController */
$typoScriptFrontendController = $GLOBALS['TSFE'];
return $typoScriptFrontendController->sys_language_uid;
if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 10000000) {
/** @var LanguageAspect $languageAspect */
$languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');
$sysLanguageUid = $languageAspect->getId();
} else {
/** @var TypoScriptFrontendController $typoScriptFrontendController */
$typoScriptFrontendController = $GLOBALS['TSFE'];
$sysLanguageUid = $typoScriptFrontendController->sys_language_uid;
}
return $sysLanguageUid;
}
}
......@@ -31,13 +31,12 @@ use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList;
/**
* Class ControlViewHelper
**/
class ControlViewHelper extends AbstractViewHelper {
class ControlViewHelper extends \SgCookieAbstractViewHelper {
/**
* Initialize the ViewHelper arguments
......
......@@ -26,13 +26,15 @@ namespace SGalinski\SgCookieOptin\ViewHelpers\Backend;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
/**
* Class EditLink
**/
class EditOnClickViewHelper extends AbstractViewHelper {
class EditOnClickViewHelper extends \SgCookieAbstractViewHelper {
/**
* Register the ViewHelper arguments
......@@ -48,12 +50,20 @@ class EditOnClickViewHelper extends AbstractViewHelper {
* Renders the onclick script for editing a record
*
* @return string
* @throws \TYPO3\CMS\Backend\Routing\Exception\RouteNotFoundException
*/
public function render() {
return BackendUtility::editOnClick(
'&edit[' . $this->arguments['table'] . '][' . $this->arguments['uid'] . ']=' .
($this->arguments['new'] ? 'new' : 'edit'), '', -1
);
$params = '&edit[' . $this->arguments['table'] . '][' . $this->arguments['uid'] . ']='
. ($this->arguments['new'] ? 'new' : 'edit');
if (version_compare(VersionNumberUtility::getNumericTypo3Version(), '10.0.0', '>=')) {
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$onclickScript = 'window.location.href=\'' . $uriBuilder->buildUriFromRoute(
'record_edit'
) . $params . '&returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '\'';
} else {
$onclickScript = BackendUtility::editOnClick($params, '', -1);
}
return $onclickScript;
}
}
......@@ -31,12 +31,11 @@ use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Class IconViewHelper
**/
class IconViewHelper extends AbstractViewHelper {
class IconViewHelper extends \SgCookieAbstractViewHelper {
/**
* @var boolean
*/
......
......@@ -37,7 +37,8 @@ $configuration = [
extend_table_link_text, extend_table_link_text_close, cookie_name_text, cookie_provider_text,
cookie_purpose_text, cookie_lifetime_text, iframe_title, iframe_description, iframe_button_allow_all_text,
iframe_button_allow_one_text, iframe_button_load_one_text, iframe_open_settings_text, template_html,
banner_html, banner_button_accept_text, banner_button_settings_text, banner_description',
banner_html, banner_button_accept_text, banner_button_settings_text, banner_description,
save_confirmation_text',
'delete' => 'deleted',
'hideTable' => FALSE,
'languageField' => 'sys_language_uid',
......@@ -68,17 +69,19 @@ $configuration = [
banner_color_button_accept_hover, banner_color_button_accept_text, banner_color_link_text,
banner_button_accept_text, banner_button_settings_text, banner_description, show_button_close,
activate_testing_mode, color_full_box, color_full_headline, color_full_text, color_full_button_close,
color_full_button_close_hover, color_full_button_close_text, color_table_header',
color_full_button_close_hover, color_full_button_close_text, color_table_header, save_confirmation_text,
color_confirmation_background, color_confirmation_text, session_only_essential_cookies',
],
'types' => [
'1' => [
'showitem' => '
--div--;LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.tab.textAndMenu,
header, description, --palette--;;accept_buttons_texts, --palette--;;link_texts,
--palette--;;cookie_texts, navigation,
header, description, save_confirmation_text, --palette--;;accept_buttons_texts,
--palette--;;link_texts, --palette--;;cookie_texts, navigation,
--div--;LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.tab.color,
--palette--;;template, --palette--;;color_general, --palette--;;color_checkbox,
--palette--;;color_button, --palette--;;color_list, --palette--;;color_table,
--palette--;;template, --palette--;;color_general, --palette--;;color_notification,
--palette--;;color_checkbox, --palette--;;color_button, --palette--;;color_list,
--palette--;;color_table,
--div--;LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.tab.iframes,
iframe_enabled, iframe_title, iframe_description, --palette--;;iframe_texts,
--palette--;;iframe_colors, --palette--;;iframe_template, --palette--;;iframe_replacement_template,
......@@ -91,7 +94,7 @@ $configuration = [
--div--;LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.tab.group,
groups,
--div--;LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.tab.settings,
cookie_lifetime, minify_generated_data, activate_testing_mode',
--palette--;;cookie_lifetime_settings, minify_generated_data, activate_testing_mode',
],
],
'palettes' => [
......@@ -112,6 +115,10 @@ $configuration = [
'color_general' => [
'showitem' => 'color_full_box, color_full_headline, color_full_text, --linebreak--, color_box, color_headline, color_text'
],
'color_notification' =>[
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.color_notification',
'showitem' => 'color_confirmation_background, color_confirmation_text'
],
'color_checkbox' => [
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.colors_checkboxes',
'showitem' => 'color_checkbox_required, color_checkbox'
......@@ -185,6 +192,10 @@ $configuration = [
'showitem' => 'banner_selection, banner_overwritten, --linebreak--,
banner_html'
],
'cookie_lifetime_settings' => [
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.palette.cookie_lifetime_settings',
'showitem' => 'cookie_lifetime, session_only_essential_cookies'
],
],
'columns' => [
'pid' => [
......@@ -253,6 +264,17 @@ $configuration = [
'eval' => 'trim'
],
],
'save_confirmation_text' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.save_confirmation_text',
'config' => [
'type' => 'input',
'size' => 30,
'default' => 'Cookie-Einstellungen erfolgreich gespeichert',
'placeholder' => 'Cookie-Einstellungen erfolgreich gespeichert',
'eval' => 'trim, required'
],
],
'accept_all_text' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.accept_all_text',
......@@ -443,6 +465,30 @@ $configuration = [
'eval' => 'trim, required'
],
],
'color_confirmation_background' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.color_confirmation_background',
'config' => [
'type' => 'input',
'renderType' => 'colorpicker',
'default' => '#C9FFC9',
'placeholder' => '#208A20',
'eval' => 'trim, required'
]
],
'color_confirmation_text' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.color_confirmation_text',
'config' => [
'type' => 'input',
'renderType' => 'colorpicker',
'default' => '#208A20',
'placeholder' => '#208A20',
'eval' => 'trim, required'
]
],
'color_checkbox' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
......@@ -897,6 +943,7 @@ $configuration = [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.iframe_selection',
'onChange' => 'reload',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
......@@ -930,6 +977,7 @@ $configuration = [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.iframe_replacement_selection',
'onChange' => 'reload',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
......@@ -949,6 +997,15 @@ $configuration = [
'eval' => 'trim, int, required'
],
],
'session_only_essential_cookies' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.session_only_essential_cookies',
'config' => [
'type' => 'check',
'default' => '0',
],
],
'minify_generated_data' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
......@@ -987,6 +1044,7 @@ $configuration = [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.template_selection',
'onChange' => 'reload',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
......@@ -1059,6 +1117,7 @@ $configuration = [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_cookie_optin/Resources/Private/Language/locallang_db.xlf:tx_sgcookieoptin_domain_model_optin.banner_selection',
'onChange' => 'reload',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
......@@ -1313,6 +1372,8 @@ if (TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(T
$configuration['columns']['color_box']['config']['renderType'],
$configuration['columns']['color_headline']['config']['renderType'],
$configuration['columns']['color_text']['config']['renderType'],
$configuration['columns']['color_confirmation_background']['config']['renderType'],
$configuration['columns']['color_confirmation_text']['config']['renderType'],
$configuration['columns']['color_checkbox']['config']['renderType'],
$configuration['columns']['color_checkbox_required']['config']['renderType'],
$configuration['columns']['color_button_all']['config']['renderType'],
......
......@@ -118,8 +118,12 @@
<target><![CDATA[Template-Vorschau]]></target>
</trans-unit>
<trans-unit id="configuration.folder" approved="yes">
<source><![CDATA[The folder, where the generated files should be saved]]></source>
<target><![CDATA[Der Ordner, in welchem die generierten Dateien gespeichert werden sollen]]></target>
<source><![CDATA[Directory for generated files: The folder where the generated files should be saved (e.g. fileadmin/cookie-banner or EXT:extension_key/path/to/cookies).]]></source>
<target><![CDATA[Ordner für generierte Dateien: Der Ordner, in dem die generierten Dateien gespeichert werden sollen (z.B. fileadmin/cookie-banner oder EXT:extension_key/path/to/cookies).]]></target>
</trans-unit>
<trans-unit id="configuration.hideModuleInProductionContext" approved="yes">
<source><![CDATA[Hide Backend Module if TYPO3 is in production context]]></source>
<target><![CDATA[Backend-Modul verstecken, wenn TYPO3 im Production-Kontext läuft]]></target>
</trans-unit>
<trans-unit id="configuration.licenseKey" approved="yes">
<source><![CDATA[License Key]]></source>
......
......@@ -97,6 +97,10 @@
<source><![CDATA[Button for Accepting Selected Cookies & Scripts]]></source>
<target><![CDATA[Button zum Akzeptieren ausgewählter Skripte & Cookies]]></target>
</trans-unit>
<trans-unit id="tx_sgcookieoptin_domain_model_optin.activate_testing_mode" approved="yes">
<source><![CDATA[Activate the testing mode (The parameter "?showOptIn=1" must be added to the url)]]></source>
<target><![CDATA[Aktiviere den Test-Modus (Der Parameter "?showOptIn=1" muss an die URL angefügt werden)]]></target>
</trans-unit>
<trans-unit id="tx_sgcookieoptin_domain_model_optin.banner_button_accept_text" approved="yes">
<source><![CDATA[Accept Button Text]]></source>
<target><![CDATA[Akzeptieren-Button Text]]></target>
......@@ -181,6 +185,10 @@
<source><![CDATA[Show the Settings Button within the Banner (Should be enabled if the website uses cookies.)]]></source>
<target><![CDATA[Einstellungs-Button im Banner anzeigen (Dies sollte aktiviert werden, falls die Website Cookies verwendet)]]></target>
</trans-unit>
<trans-unit id="tx_sgcookieoptin_domain_model_optin.color_Table_data_text" approved="yes">
<source><![CDATA[Text Color - Data]]></source>
<target><![CDATA[Textfarbe - Daten]]></target>
</trans-unit>
<trans-unit id="tx_sgcookieoptin_domain_model_optin.color_box" approved="yes">
<source><![CDATA[Window]]></source>
<target><![CDATA[Fenster]]></target>
......@@ -241,6 +249,26 @@
<source><![CDATA[Essential Cookies & Scripts (always ticked off)]]></source>
<target><![CDATA[Essentielle Cookies & Skripte (immer abgehakt)]]></target>
</trans-unit>
<trans-unit id="tx_sgcookieoptin_domain_model_optin.color_confirmation_background" approved="yes">
<source><![CDATA[Confirmation Background]]></source>
<target><![CDATA[Bestätigung Hintergrund]]></target>
</trans-unit>
<trans-unit id="tx_sgcookieoptin_domain_model_optin.color_confirmation_text" approved="yes">
<source><![CDATA[Confirmation Text]]></source>
<target><![CDATA[Bestätigung Text]]></target>
</trans-unit>
<trans-unit id="tx_sgcookieoptin_domain_model_optin.color_full_box" approved="yes">
<source><![CDATA[Window (upper part)]]></source>