diff --git a/Classes/Service/ConfigurationService.php b/Classes/Service/ConfigurationService.php index 2df1e6b..5a770eb 100644 --- a/Classes/Service/ConfigurationService.php +++ b/Classes/Service/ConfigurationService.php @@ -15,6 +15,9 @@ class ConfigurationService { private static ?ConfigurationService $_instance = null; + /** + * @var array|null + */ private static ?array $settings = null; public static function getInstance(): ConfigurationService diff --git a/Classes/ViewHelpers/Forms/ReCaptchaViewHelper.php b/Classes/ViewHelpers/Forms/ReCaptchaViewHelper.php index 923c73f..20cc697 100644 --- a/Classes/ViewHelpers/Forms/ReCaptchaViewHelper.php +++ b/Classes/ViewHelpers/Forms/ReCaptchaViewHelper.php @@ -5,7 +5,6 @@ use Neusta\Formrecaptcha\Service\ConfigurationService; use TYPO3\CMS\Core\Page\AssetCollector; -use TYPO3\CMS\Core\Page\PageRenderer; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper; use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; diff --git a/Configuration/Form/Yaml/BaseSetup.yaml b/Configuration/Form/Yaml/BaseSetup.yaml index 5e9418e..4e1f993 100755 --- a/Configuration/Form/Yaml/BaseSetup.yaml +++ b/Configuration/Form/Yaml/BaseSetup.yaml @@ -17,11 +17,11 @@ TYPO3: partialRootPaths: 1566214550: 'EXT:formrecaptcha/Resources/Private/Partials/Forms/Frontend/FormElements/' Recaptcha: - __inheritances: - 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin' - implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement' + implementationClassName: TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement properties: containerClassAttribute: 'recaptcha' + elementClassAttribute: '' + elementErrorClassAttribute: error formEditor: label: 'formEditor.elements.Recaptcha.label' group: custom @@ -34,6 +34,41 @@ TYPO3: renderingOptions: submitButtonLabel: 'true' editors: + 100: + identifier: header + templateName: Inspector-FormElementHeaderEditor + 200: + identifier: label + templateName: Inspector-TextEditor + label: formEditor.elements.FormElement.editor.label.label + propertyPath: label + 230: + identifier: elementDescription + templateName: Inspector-TextEditor + label: formEditor.elements.FormElement.editor.elementDescription.label + propertyPath: properties.elementDescription + 700: + identifier: gridColumnViewPortConfiguration + templateName: Inspector-GridColumnViewPortConfigurationEditor + label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.label + configurationOptions: + viewPorts: + 10: + viewPortIdentifier: xs + label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.xs.label + 20: + viewPortIdentifier: sm + label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.sm.label + 30: + viewPortIdentifier: md + label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.md.label + 40: + viewPortIdentifier: lg + label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.lg.label + numbersOfColumnsToUse: + label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.numbersOfColumnsToUse.label + propertyPath: 'properties.gridColumnClassAutoConfiguration.viewPorts.{@viewPortIdentifier}.numbersOfColumnsToUse' + fieldExplanationText: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.numbersOfColumnsToUse.fieldExplanationText 800: null 900: identifier: 'validators' @@ -43,8 +78,9 @@ TYPO3: 10: value: 'Recaptcha' label: 'formEditor.elements.TextMixin.validators.Recaptcha.editor.header.label' - - + 9999: + identifier: removeButton + templateName: Inspector-RemoveElementEditor validatorsDefinition: Recaptcha: implementationClassName: 'Neusta\Formrecaptcha\Validation\RecaptchaValidator' diff --git a/composer.json b/composer.json index fe5ac9c..16b8163 100755 --- a/composer.json +++ b/composer.json @@ -12,15 +12,21 @@ "role": "Developer" } ], - "version": "2.0.1", + "version": "3.0.0", + "extra": { + "typo3/cms": { + "extension-key": "formrecaptcha" + } + }, "extra": { "typo3/cms": { "extension-key": "formrecaptcha" } }, "require": { - "typo3/cms-core": "^10.4", - "typo3/cms-form": "^10.4" + "typo3/cms-core": "^10.4 || ^11.5", + "typo3/cms-extbase": "^10.4 || ^11.5", + "typo3/cms-form": "^10.4 || ^11.5" }, "suggest": { "vlucas/phpdotenv": "^5.2" @@ -30,8 +36,7 @@ }, "autoload": { "psr-4": { - "Neusta\\Formrecaptcha\\": "Classes/", - "Neusta\\Formrecaptcha\\Tests\\": "Tests/" + "Neusta\\Formrecaptcha\\": "Classes/" } } } diff --git a/ext_emconf.php b/ext_emconf.php index 16549a2..78cd16e 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -10,11 +10,12 @@ 'state' => 'stable', 'uploadfolder' => '0', 'clearCacheOnLoad' => 1, - 'version' => '2.0.1', + 'version' => '3.0.0', 'constraints' => [ 'depends' => [ - 'typo3' => '10.4.0-10.4.99', - 'form' => '10.4.0-10.4.99' + 'php' => '7.4-', + 'typo3' => '10.4-', + 'form' => '10.4-' ] ] ]; diff --git a/ext_localconf.php b/ext_localconf.php index 644344a..760f3eb 100755 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,22 +1,28 @@ ' ); // TypoScript Setup - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup( + ExtensionManagementUtility::addTypoScriptSetup( '' ); - $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); + $iconRegistry = GeneralUtility::makeInstance(IconRegistry::class); $iconRegistry->registerIcon( 'recaptcha', - \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, + SvgIconProvider::class, [ 'source' => 'EXT:formrecaptcha/Resources/Public/Icons/recaptcha.svg' ]