Merge branch 'develop'
This commit is contained in:
@@ -1,5 +0,0 @@
|
|||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/PageTS/Mod/WebLayout/BackendLayouts.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/PageTS/Wizards/NewContentElement.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/PageTS/RTE.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/PageTS/TCEFORM.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/PageTS/Mod/SHARED.tsconfig">
|
|
||||||
@@ -133,4 +133,10 @@ call_user_func(function() {
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
|
||||||
|
'ep_events',
|
||||||
|
'Configuration/TSconfig/Page/Main.tsconfig',
|
||||||
|
'EP Events'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/TSconfig/Page/Mod/SHARED.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/TSconfig/Page/Mod/Wizards/NewContentElement.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/TSconfig/Page/RTE.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/TSconfig/Page/TCEFORM.tsconfig">
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpTheme\Form;
|
||||||
|
|
||||||
|
use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher;
|
||||||
|
|
||||||
|
class AddReferrerFinisher extends AbstractFinisher
|
||||||
|
{
|
||||||
|
protected function executeInternal()
|
||||||
|
{
|
||||||
|
// Look for key 'referrer' in frontend session
|
||||||
|
$referrer = $GLOBALS['TSFE']->fe_user->getKey('ses', 'referrer');
|
||||||
|
|
||||||
|
if (null === $referrer) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add textfield to form containing referrer value
|
||||||
|
$field = $this->finisherContext
|
||||||
|
->getFormRuntime()
|
||||||
|
->getFormDefinition()
|
||||||
|
->getPageByIndex(0)
|
||||||
|
->createElement('referrer', 'Text');
|
||||||
|
|
||||||
|
$field->setDefaultValue($referrer);
|
||||||
|
$field->setDataType('string');
|
||||||
|
$field->setLabel('Referrer');
|
||||||
|
|
||||||
|
// Add finisher variable for potential later use
|
||||||
|
$this->finisherContext->getFinisherVariableProvider()->add(
|
||||||
|
$this->shortFinisherIdentifier,
|
||||||
|
'referrer',
|
||||||
|
$referrer
|
||||||
|
);
|
||||||
|
|
||||||
|
// Remove session key
|
||||||
|
$GLOBALS['TSFE']->fe_user->setKey('ses', 'referrer', null);
|
||||||
|
$GLOBALS['TSFE']->fe_user->storeSessionData();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpTheme\Middleware;
|
||||||
|
|
||||||
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
|
use Psr\Http\Server\MiddlewareInterface;
|
||||||
|
use Psr\Http\Server\RequestHandlerInterface;
|
||||||
|
use TYPO3\CMS\Core\Exception\SiteNotFoundException;
|
||||||
|
use TYPO3\CMS\Core\Site\SiteFinder;
|
||||||
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
|
|
||||||
|
class ReferrerMiddleware implements MiddlewareInterface
|
||||||
|
{
|
||||||
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||||
|
{
|
||||||
|
$queryParams = $request->getQueryParams();
|
||||||
|
|
||||||
|
if (!array_key_exists('ref', $queryParams)) {
|
||||||
|
return $handler->handle($request);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ref = $queryParams['ref'];
|
||||||
|
|
||||||
|
/** @var SiteFinder $siteFinder */
|
||||||
|
$siteFinder = GeneralUtility::makeInstance(SiteFinder::class);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$site = $siteFinder->getSiteByPageId($ref);
|
||||||
|
$url = $site->getRouter()->generateUri($ref);
|
||||||
|
$GLOBALS['TSFE']->fe_user->setKey('ses', 'referrer', $url);
|
||||||
|
$GLOBALS['TSFE']->fe_user->storeSessionData();
|
||||||
|
}
|
||||||
|
catch (SiteNotFoundException $exception) {
|
||||||
|
}
|
||||||
|
|
||||||
|
return $handler->handle($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/PageTS/Mod/WebLayout/BackendLayouts.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/PageTS/Mod/Wizards/NewContentElement.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/PageTS/Extensions/GridElements.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/PageTS/RTE.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/PageTS/TCEFORM.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/PageTS/TCEMAIN.tsconfig">
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_events/Configuration/PageTS/Mod/SHARED.tsconfig">
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'frontend' => [
|
||||||
|
'ep/referrer' => [
|
||||||
|
'target' => \EP\EpTheme\Middleware\ReferrerMiddleware::class,
|
||||||
|
'after' => [
|
||||||
|
'typo3/cms-frontend/site',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
@@ -128,7 +128,7 @@ call_user_func(function() {
|
|||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
|
||||||
'ep_theme',
|
'ep_theme',
|
||||||
'Configuration/TypoScript/pageTSconfig.ts',
|
'Configuration/TSconfig/Page/Main.tsconfig',
|
||||||
'EP Theme'
|
'EP Theme'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/TSconfig/Page/Extensions/GridElements.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/TSconfig/Page/Mod/SHARED.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/TSconfig/Page/Mod/Wizards/NewContentElement.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/TSconfig/Page/RTE.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/TSconfig/Page/TCEFORM.tsconfig">
|
||||||
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ep_theme/Configuration/TSconfig/Page/TCEMAIN.tsconfig">
|
||||||
@@ -1,13 +1,16 @@
|
|||||||
@import "EXT:form/Configuration/TypoScript/setup.typoscript"
|
@import 'EXT:form/Configuration/TypoScript/setup.typoscript'
|
||||||
|
@import 'EXT:form_element_linked_checkbox/Configuration/TypoScript/setup.typoscript'
|
||||||
|
|
||||||
plugin.tx_form.view {
|
plugin.tx_form.view {
|
||||||
templateRootPaths.10 = EXT:ep_theme/Resources/Private/Templates/Form/
|
templateRootPaths.10 = EXT:ep_theme/Resources/Private/Templates/Form/
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.tx_form.settings.yamlConfigurations {
|
plugin.tx_form.settings.yamlConfigurations {
|
||||||
100 = EXT:ep_theme/Configuration/Forms/FormSetup.yaml
|
1630994710 = EXT:ep_theme/Configuration/Yaml/FormsBase.yaml
|
||||||
|
1630994711 = EXT:ep_theme/Configuration/Yaml/FormFinishersFrontend.yaml
|
||||||
}
|
}
|
||||||
|
|
||||||
module.tx_form.settings.yamlConfigurations {
|
module.tx_form.settings.yamlConfigurations {
|
||||||
100 = EXT:ep_theme/Configuration/Forms/FormSetup.yaml
|
1630994710 = EXT:ep_theme/Configuration/Yaml/FormsBase.yaml
|
||||||
|
1630994711 = EXT:ep_theme/Configuration/Yaml/FormFinishersBackend.yaml
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
TYPO3:
|
||||||
|
CMS:
|
||||||
|
Form:
|
||||||
|
prototypes:
|
||||||
|
standard:
|
||||||
|
formElementsDefinition:
|
||||||
|
Form:
|
||||||
|
formEditor:
|
||||||
|
editors:
|
||||||
|
900:
|
||||||
|
selectOptions:
|
||||||
|
1000:
|
||||||
|
value: 'BpnApiFinisher'
|
||||||
|
label: 'BusPro Finisher'
|
||||||
|
1100:
|
||||||
|
value: 'AddReferrerFinisher'
|
||||||
|
label: 'Referrer Finisher'
|
||||||
|
propertyCollections:
|
||||||
|
finishers:
|
||||||
|
1000:
|
||||||
|
identifier: 'BpnApiFinisher'
|
||||||
|
editors:
|
||||||
|
__inheritances:
|
||||||
|
10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin'
|
||||||
|
100:
|
||||||
|
label: 'BusPro Finisher'
|
||||||
|
110:
|
||||||
|
identifier: 'mapping'
|
||||||
|
templateName: 'Inspector-TextEditor'
|
||||||
|
label: 'Mapping'
|
||||||
|
propertyPath: 'options.mapping'
|
||||||
|
propertyValidators:
|
||||||
|
10: 'NotEmpty'
|
||||||
|
1100:
|
||||||
|
identifier: 'AddReferrerFinisher'
|
||||||
|
editors:
|
||||||
|
__inheritances:
|
||||||
|
10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin'
|
||||||
|
100:
|
||||||
|
label: 'Referrer Finisher'
|
||||||
|
|
||||||
|
finishersDefinition:
|
||||||
|
BpnApiFinisher:
|
||||||
|
formEditor:
|
||||||
|
iconIdentifier: 'form-finisher'
|
||||||
|
predefinedDefaults:
|
||||||
|
options:
|
||||||
|
mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,street:text-3,zipCode:text-4,city:text-5,phone:telephone-1'
|
||||||
|
AddReferrerFinisher:
|
||||||
|
formEditor:
|
||||||
|
iconIdentifier: 'form-finisher'
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
TYPO3:
|
||||||
|
CMS:
|
||||||
|
Form:
|
||||||
|
prototypes:
|
||||||
|
standard:
|
||||||
|
finishersDefinition:
|
||||||
|
BpnApiFinisher:
|
||||||
|
implementationClassName: 'EP\EpTheme\Form\BpnApiFinisher'
|
||||||
|
formEditor:
|
||||||
|
label: 'BusPro Finisher'
|
||||||
|
options:
|
||||||
|
identifier: 'BpnApiFinisher'
|
||||||
|
mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,street:text-3,zipCode:text-4,city:text-5,phone:telephone-1'
|
||||||
|
AddReferrerFinisher:
|
||||||
|
implementationClassName: 'EP\EpTheme\Form\AddReferrerFinisher'
|
||||||
|
formEditor:
|
||||||
|
label: 'Referrer Finisher'
|
||||||
|
options:
|
||||||
|
identifier: 'AddReferrerFinisher'
|
||||||
+3
-9
@@ -4,26 +4,20 @@ TYPO3:
|
|||||||
persistenceManager:
|
persistenceManager:
|
||||||
allowedExtensionPaths:
|
allowedExtensionPaths:
|
||||||
10: EXT:ep_theme/Resources/Private/Forms/
|
10: EXT:ep_theme/Resources/Private/Forms/
|
||||||
|
|
||||||
prototypes:
|
prototypes:
|
||||||
standard:
|
standard:
|
||||||
finishersDefinition:
|
|
||||||
BpnApiFinisher:
|
|
||||||
implementationClassName: 'EP\EpTheme\Form\BpnApiFinisher'
|
|
||||||
formElementsDefinition:
|
formElementsDefinition:
|
||||||
Form:
|
Form:
|
||||||
renderingOptions:
|
renderingOptions:
|
||||||
templateRootPaths:
|
templateRootPaths:
|
||||||
100: 'EXT:ep_theme/Resources/Private/Templates/Form/'
|
1505042810: 'EXT:ep_theme/Resources/Private/Templates/Form/'
|
||||||
partialRootPaths:
|
partialRootPaths:
|
||||||
100: 'EXT:ep_theme/Resources/Private/Partials/Form/'
|
1505042810: 'EXT:ep_theme/Resources/Private/Partials/Form/'
|
||||||
layoutRootPaths:
|
layoutRootPaths:
|
||||||
100: 'EXT:ep_theme/Resources/Private/Layouts/Form/'
|
1505042810: 'EXT:ep_theme/Resources/Private/Layouts/Form/'
|
||||||
|
|
||||||
contactform:
|
contactform:
|
||||||
__inheritances:
|
__inheritances:
|
||||||
10: 'TYPO3.CMS.Form.prototypes.standard'
|
10: 'TYPO3.CMS.Form.prototypes.standard'
|
||||||
|
|
||||||
applicationform:
|
applicationform:
|
||||||
__inheritances:
|
__inheritances:
|
||||||
10: 'TYPO3.CMS.Form.prototypes.standard'
|
10: 'TYPO3.CMS.Form.prototypes.standard'
|
||||||
Reference in New Issue
Block a user