diff --git a/Classes/Controller/ValidationController.php b/Classes/Controller/ValidationController.php new file mode 100644 index 0000000000..93975747be --- /dev/null +++ b/Classes/Controller/ValidationController.php @@ -0,0 +1,54 @@ + + * + * This file is part of the Kitodo and TYPO3 projects. + * + * @license GNU General Public License version 3 or later. + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. + */ + +namespace Kitodo\Dlf\Controller; + +use Kitodo\Dlf\Validation\Configuration\YamlConfigurationProvider; +use Psr\Http\Message\ResponseInterface; +use TYPO3\CMS\Core\Site\Entity\SiteLanguage; +use TYPO3\CMS\Core\Utility\GeneralUtility; + +/** + * Plugin 'Validation' for the 'dlf' extension + * + * @package TYPO3 + * @subpackage dlf + * + * @access public + */ +class ValidationController extends AbstractController +{ + /** + * @access public + * + * @return ResponseInterface the response + */ + public function mainAction(): ResponseInterface + { + $validationConfiguration = GeneralUtility::makeInstance(YamlConfigurationProvider::class)->getConfiguration($this->settings['type']); + + /** @var SiteLanguage $siteLanguage */ + $siteLanguage = $this->request->getAttribute('language') ?? $this->request->getAttribute('site')->getDefaultLanguage(); + + $disabledValidators = []; + foreach ($validationConfiguration as $key => $value) { + if (isset($value['disabled']) && $value['disabled'] === "true") { + $disabledValidators[$key]['title'] = $value['title']; + $disabledValidators[$key]['shortDescription'] = $value['shortDescription']; + } + } + + $this->view->assign("url", $siteLanguage->getBase()->getPath() . '?middleware=dlf/dom-document-validation'); + $this->view->assign("disabledValidators", $disabledValidators); + return $this->htmlResponse(); + } +} diff --git a/Classes/Controller/ValidationFormController.php b/Classes/Controller/ValidationFormController.php deleted file mode 100644 index ab59106d99..0000000000 --- a/Classes/Controller/ValidationFormController.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * This file is part of the Kitodo and TYPO3 projects. - * - * @license GNU General Public License version 3 or later. - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - */ - -namespace Kitodo\Dlf\Controller; - -use Psr\Http\Message\ResponseInterface; -use TYPO3\CMS\Core\Site\Entity\SiteLanguage; -use TYPO3\CMS\Core\TypoScript\TypoScriptService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; - -/** - * Plugin 'ValidationForm' for the 'dlf' extension - * - * @package TYPO3 - * @subpackage dlf - * - * @access public - */ -class ValidationFormController extends AbstractController -{ - /** - * @access public - * - * @return ResponseInterface the response - */ - public function mainAction(): ResponseInterface - { - /** @var SiteLanguage $siteLanguage */ - $siteLanguage = $this->request->getAttribute('language') ?? $this->request->getAttribute('site')->getDefaultLanguage(); - - $typeParam = 'dfgviewer'; - - // retrieve validation configuration from plugin.tx_dlf typoscript - /** @var ConfigurationManagerInterface $configurationManager */ - $configurationManager = GeneralUtility::makeInstance(ConfigurationManagerInterface::class); - $typoScript = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); - - /** @var TypoScriptService $typoScriptService */ - $typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class); - $settings = $typoScriptService->convertTypoScriptArrayToPlainArray($typoScript['plugin.']['tx_dlf.']['settings.']); - - $disabledValidators = []; - if (array_key_exists("domDocumentValidation", $settings) && array_key_exists($typeParam, $settings["domDocumentValidation"])) { - $validationConfiguration = $settings['domDocumentValidation'][$typeParam]; - foreach ($validationConfiguration as $key => $value) { - if (isset($value['disabled']) && $value['disabled'] === "true") { - $disabledValidators[$key]['title'] = $value['title']; - $disabledValidators[$key]['shortdescription'] = $value['shortdescription']; - } - } - } - - $this->view->assign("url", $siteLanguage->getBase()->getPath() . '?middleware=dlf/dom-document-validation'); - $this->view->assign("disabledValidators", $disabledValidators); - return $this->htmlResponse(); - } -} diff --git a/Classes/Middleware/DOMDocumentValidation.php b/Classes/Middleware/DOMDocumentValidation.php index dcdd0f6cc4..4ae5d7de58 100644 --- a/Classes/Middleware/DOMDocumentValidation.php +++ b/Classes/Middleware/DOMDocumentValidation.php @@ -15,6 +15,7 @@ use DOMDocument; use Exception; use InvalidArgumentException; +use Kitodo\Dlf\Validation\Configuration\YamlConfigurationProvider; use Kitodo\Dlf\Validation\DOMDocumentValidationStack; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -46,7 +47,6 @@ class DOMDocumentValidation implements MiddlewareInterface private const BAD_REQUEST = 400; private const NOT_FOUND = 404; - private const INTERNAL_SERVER_ERROR = 500; private ServerRequestInterface $request; @@ -84,6 +84,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface if ($typeParam === null) { return $this->getJsonResponse('Validation type parameter is missing.', self::BAD_REQUEST); } + // load dom document from url if (!GeneralUtility::isValidUrl($urlParam)) { return $this->getJsonResponse('Parameter "' . $urlParam . '" is not a valid URL.', self::NOT_FOUND); @@ -104,26 +105,14 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface return $this->getJsonResponse("Content from the URL is not valid XML.", self::BAD_REQUEST); } - // retrieve validation configuration from plugin.tx_dlf typoscript - /** @var ConfigurationManagerInterface $configurationManager */ - $configurationManager = GeneralUtility::makeInstance(ConfigurationManagerInterface::class); - $typoScript = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); - - /** @var TypoScriptService $typoScriptService */ - $typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class); - $settings = $typoScriptService->convertTypoScriptArrayToPlainArray($typoScript['plugin.']['tx_dlf.']['settings.']); - - if (!array_key_exists("domDocumentValidation", $settings)) { - $this->logger->error('DOMDocumentValidation is not configured.'); - return $this->getJsonResponse('An internal server error occurred.', self::INTERNAL_SERVER_ERROR); - } + $validationConfiguration = GeneralUtility::makeInstance(YamlConfigurationProvider::class)->getConfiguration($typeParam); - if (!array_key_exists($typeParam, $settings["domDocumentValidation"])) { + if (empty($validationConfiguration)) { $this->logger->debug('Validation configuration type in validationType parameter "' . $typeParam . '" does not exist.'); - return $this->getJsonResponse('Validation type does not exist.', self::NOT_FOUND); + return $this->getJsonResponse('Validation type parameter does not exist.', self::NOT_FOUND); } - $validationConfiguration = $this->removeDisabledValidators($parameters, $settings['domDocumentValidation'][$typeParam]); + $validationConfiguration = $this->removeDisabledValidators($parameters, $validationConfiguration); $validation = GeneralUtility::makeInstance(DOMDocumentValidationStack::class, $validationConfiguration); diff --git a/Classes/Validation/Configuration/YamlConfigurationProvider.php b/Classes/Validation/Configuration/YamlConfigurationProvider.php new file mode 100644 index 0000000000..1375598ce9 --- /dev/null +++ b/Classes/Validation/Configuration/YamlConfigurationProvider.php @@ -0,0 +1,78 @@ + + * + * This file is part of the Kitodo and TYPO3 projects. + * + * @license GNU General Public License version 3 or later. + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. + */ + +namespace Kitodo\Dlf\Validation\Configuration; + +use TYPO3\CMS\Core\Configuration\Loader\YamlFileLoader; +use TYPO3\CMS\Core\Log\Logger; +use TYPO3\CMS\Core\Log\LogManager; +use TYPO3\CMS\Core\Package\PackageManager; +use TYPO3\CMS\Core\Utility\GeneralUtility; + +class YamlConfigurationProvider +{ + + /** + * @access private + * @var Logger This holds the logger + */ + private Logger $logger; + + /** + * @access private + * @var ?PackageManager This holds the package manager + */ + private ?PackageManager $packageManager; + + /** + * @access private + * @var ?YamlFileLoader This holds the YAML file loader + */ + private ?YamlFileLoader $yamlFileLoader; + + /** + * Constructs the Reader instance + * + * @access public + * + * @param ?PackageManager $packageManager The package manager + * @param ?YamlFileLoader $yamlFileLoader The YAML file loader + * + * @return void + */ + public function __construct(?PackageManager $packageManager = null, ?YamlFileLoader $yamlFileLoader = null) + { + $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class); + $this->packageManager = $packageManager ?? GeneralUtility::makeInstance(PackageManager::class); + $this->yamlFileLoader = $yamlFileLoader ?? GeneralUtility::makeInstance(YamlFileLoader::class); + } + + /** + * @return array> + */ + public function getConfiguration(string $type): array + { + foreach ($this->packageManager->getActivePackages() as $package) { + $packagePath = rtrim($package->getPackagePath(), '/'); + $configurationFile = $packagePath . '/Configuration/Kitodo/Validation/' . $type . '.yaml'; + if (is_file($configurationFile)) { + $configuration = $this->yamlFileLoader->load($configurationFile); + if (is_array($configuration)) { + return $configuration; + } else { + $this->logger->error('Invalid configuration file: ' . $configurationFile); + } + } + } + return []; + } +} diff --git a/Configuration/FlexForms/ValidationForm.xml b/Configuration/FlexForms/Validation.xml similarity index 88% rename from Configuration/FlexForms/ValidationForm.xml rename to Configuration/FlexForms/Validation.xml index 0ef5104ea7..8010534387 100644 --- a/Configuration/FlexForms/ValidationForm.xml +++ b/Configuration/FlexForms/Validation.xml @@ -20,8 +20,8 @@ 1 - - LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:validationForm.flexForm.type.description + + LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:validation.flexForm.type.description input required,trim diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index 2e6fb45f2c..265896dec9 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -101,22 +101,22 @@ $iconsDirectory . 'tx-dlf-embedded3dviewer.svg' ); -// Plugin "validationform". -$plugin = 'dlf_validationform'; +// Plugin "validation". +$plugin = 'dlf_validation'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$plugin] = $excludeList; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$plugin] = $addList; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'dlf_validationform', - $flexFormsPathPrefix . 'ValidationForm.xml' + 'dlf_validation', + $flexFormsPathPrefix . 'Validation.xml' ); \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'Dlf', - 'ValidationForm', - $langFile . 'validationForm' . $title, - $iconsDirectory . 'tx-dlf-validationform.svg' + 'Validation', + $langFile . 'validation' . $title, + $iconsDirectory . 'tx-dlf-validation.svg' ); // Plugin "feeds". diff --git a/Configuration/TsConfig/ContentElements.tsconfig b/Configuration/TsConfig/ContentElements.tsconfig index a0545a667c..23dbef6646 100644 --- a/Configuration/TsConfig/ContentElements.tsconfig +++ b/Configuration/TsConfig/ContentElements.tsconfig @@ -146,13 +146,13 @@ mod.wizards.newContentElement.wizardItems { list_type = dlf_toolbox } } - tx_dlf_validationform { - iconIdentifier = tx-dlf-validationform - title = LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:validationForm.plugin.title - description = LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:validationForm.plugin.description + tx_dlf_validation { + iconIdentifier = tx-dlf-validation + title = LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:validation.plugin.title + description = LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:validation.plugin.description tt_content_defValues { CType = list - list_type = dlf_validationform + list_type = dlf_validation } } } diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 24c86403e4..928984034f 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -31,8 +31,8 @@ page { } includeJSFooter { - # ValidationForm plugin - kitodo-validationForm = EXT:dlf/Resources/Public/JavaScript/ValidationForm/ValidationForm.js + # Validation plugin + kitodo-validation = EXT:dlf/Resources/Public/JavaScript/Validation/Validation.js # Verovio plugin kitodo-verovio = EXT:dlf/Resources/Public/JavaScript/Verovio/verovio-toolkit-wasm.js diff --git a/Documentation/Developers/Validation.rst b/Documentation/Developers/Validation.rst index f6cd01849a..24224878a3 100644 --- a/Documentation/Developers/Validation.rst +++ b/Documentation/Developers/Validation.rst @@ -82,28 +82,7 @@ DOMDocumentValidation Middleware Configuration -------------------------- -The validation middleware can be configured through the plugin settings in TypoScript with the block called ``domDocumentValidation``. Under this block, configuration sections (referred to as type) for different validations can be defined. When directly referencing the middleware or using the :ref:`Plugin Validation Form`, this type must be provided as the ``validationType`` parameter. - - .. code-block:: - - plugin.tx_dlf { - settings { - domDocumentValidation { - typeA { - validator { - ... - }, - validatorStack { - ... - }, - ... - }, - typeB { - ... - }, - ... - - +The validation middleware can be configured via a YAML file located within any extending extension at the path ``EXT:/Configuration/Kitodo/Validation/``. The name of the configuration file must match the configured validation type, allowing you to define different validation rules. When directly referencing the middleware or using the :ref:`Plugin Validation`, this identifier must be provided as the ``validationType`` parameter. Validators derived from ``Kitodo\Dlf\Validation\AbstractDlfValidator`` can be configured here. This also includes the use of validation stack implementations derived from ``Kitodo\Dlf\Validation\AbstractDlfValidationStack``, which use ``DOMDocument`` as the ``valueClassName`` for validation. This allows for multiple levels of nesting. @@ -114,64 +93,67 @@ For each validator, the title and description can be defined as XLF labels and a The description label can include placeholders. The syntax changes slightly in this case: a separate block is used for the description, consisting of the XLF label as the key and an additional block containing arguments. These arguments are then inserted into the placeholders within the label in the given order. The ``EXT:`` prefix can also be used as an argument value, which will be replaced with the corresponding extension path. - .. code-block:: - - plugin.tx_dlf { - settings { - domDocumentValidation { - typeA { - 10 { - title = LLL:EXT:.../locallang.xlf:title - description = LLL:EXT:.../locallang.xlf:description - } - ... - }, - typeB { - 10 { - title = LLL:EXT:.../locallang.xlf:title - description { - key = LLL:EXT:.../locallang.xlf:description - arguments { - 0 = EXT:... - 1 = Test - ... - } - } - ... - -TypoScript Example + .. code-block:: yaml + + 1: + title: 'LLL:EXT:.../locallang.xlf:title' + shortDescription: 'LLL:EXT:.../locallang.xlf:description' + description: 'LLL:EXT:.../locallang.xlf:description' + 2: + title: 'LLL:EXT:.../locallang.xlf:title' + description: + key: 'LLL:EXT:.../locallang.xlf:description' + arguments: + 0: 'EXT:...' + 1: 'Test' + className: '...\ApplicationProfileValidationStack' + +YAML Example ^^^^^^^^^^^^^^^^^^^^^^^^^ - .. code-block:: - - plugin.tx_dlf { - settings { - storagePid = {$config.storagePid} - domDocumentValidation { - dfgviewer { - 10 { - title = LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.xmlschemas.title - description { - key = LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.xmlschemas.description - arguments { - 0 = EXT:dfgviewer/Resources/Public/Xsd/Mets/1.12.1.xsd - 1 = METS 1.12.1 - 2 = EXT:dfgviewer/Resources/Public/Xsd/Mods/3.8.xsd - 3 = MODS 3.8 - } - } - className = Kitodo\Dlf\Validation\XmlSchemasValidator - configuration { - mets { - namespace = http://www.loc.gov/METS/ - schemaLocation = EXT:dfgviewer/Resources/Public/Xsd/Mets/1.12.1.xsd - } - mods { - namespace = http://www.loc.gov/mods/v3 - schemaLocation = EXT:dfgviewer/Resources/Public/Xsd/Mods/3.8.xsd - } - } - }, - ... - } - ... + .. code-block:: yaml + + 1: + title: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.xmlschemas.title' + shortDescription: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.xmlschemas.shortdescription' + description: + key: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.xmlschemas.description' + arguments: + 0: 'EXT:dfgviewer/Resources/Public/Xsd/Mets/1.12.1.xsd' + 1: 'METS 1.12.1' + 2: 'EXT:dfgviewer/Resources/Public/Xsd/Mods/3.8.xsd' + 3: 'MODS 3.8' + className: 'Kitodo\Dlf\Validation\XmlSchemasValidator' + configuration: + mets: + namespace: 'http://www.loc.gov/METS/' + schemaLocation: 'EXT:dfgviewer/Resources/Public/Xsd/Mets/1.12.1.xsd' + mods: + namespace: 'http://www.loc.gov/mods/v3' + schemaLocation: 'EXT:dfgviewer/Resources/Public/Xsd/Mods/3.8.xsd' + 2: + title: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.metsapplicationprofile.title' + shortDescription: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.metsapplicationprofile.shortdescription' + description: + key: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.metsapplicationprofile.description' + arguments: + 0: '/fileadmin/groups/dfgviewer/METS_application_profile_2.4.pdf' + 1: 'METS Application Profile version 2.4' + className: 'Slub\Dfgviewer\Validation\Mets\ApplicationProfileValidationStack' + 3: + title: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.modsapplicationprofile.title' + shortDescription: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.modsapplicationprofile.shortdescription' + description: + key: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.modsapplicationprofile.description' + arguments: + 0: '/fileadmin/groups/dfgviewer/MODS_application_profile_2.4.pdf' + 1: 'MODS Application Profile version 2.4' + className: 'Slub\Dfgviewer\Validation\Mods\ApplicationProfileValidationStack' + 4: + title: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.metsurlexistence.title' + shortDescription: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.metsurlexistence.shortdescription' + description: 'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_validation.xlf:validator.metsurlexistence.description' + className: 'Slub\Dfgviewer\Validation\MetsUrlExistenceValidator' + configuration: + excludeHosts: 'dfg-viewer.de,www.loc.gov,id.loc.gov,www.openarchives.org,purl.org,www.w3.org' + disabled: true diff --git a/Documentation/Plugins/Index.rst b/Documentation/Plugins/Index.rst index 79f8b07393..ce6833848d 100644 --- a/Documentation/Plugins/Index.rst +++ b/Documentation/Plugins/Index.rst @@ -1606,14 +1606,14 @@ The model URL is extracted from the METS file or taken from the provided model p } } -.. _Plugin Validation Form: +.. _Plugin Validation: -Validation Form +Validation --------------- -The plugin renders an input field where a METS URL can be entered. After submission, the document is loaded and validated against the :ref:`DOMDocumentValidation Middleware`. For the validation to work, a corresponding configuration (see :ref:`DOMDocumentValidation Middleware Configuration`) must be present in TypoScript, and the type of this configuration must be provided to the plugin as a required parameter. +The plugin renders an input field where a METS URL can be entered. After submission, the document is loaded and validated against the :ref:`DOMDocumentValidation Middleware`. For the validation to work, a corresponding configuration (see :ref:`DOMDocumentValidation Middleware Configuration`) must be present in your extension, and the type of this configuration must be provided to the plugin as a required parameter. -:typoscript:`plugin.tx_dlf_validationform.` +:typoscript:`plugin.tx_dlf_validation.` .. t3-field-list-table:: :header-rows: 1 diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf index dbb23049ea..273a0f5173 100644 --- a/Resources/Private/Language/de.locallang.xlf +++ b/Resources/Private/Language/de.locallang.xlf @@ -677,27 +677,27 @@ - + - + - + - + - + METS file here:]]> METS-Datei ein:]]> - + diff --git a/Resources/Private/Language/de.locallang_be.xlf b/Resources/Private/Language/de.locallang_be.xlf index 8fbe9a818a..afd0c1b51a 100644 --- a/Resources/Private/Language/de.locallang_be.xlf +++ b/Resources/Private/Language/de.locallang_be.xlf @@ -682,19 +682,19 @@ - + - + - + - + diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 03c8931243..48311c1566 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -506,22 +506,22 @@ - + - + - + - + - + METS file here:]]> - + diff --git a/Resources/Private/Language/locallang_be.xlf b/Resources/Private/Language/locallang_be.xlf index 3742ea885b..ec27263f9b 100644 --- a/Resources/Private/Language/locallang_be.xlf +++ b/Resources/Private/Language/locallang_be.xlf @@ -515,17 +515,17 @@ - + - + - - + + - - + + diff --git a/Resources/Private/Templates/ValidationForm/Main.html b/Resources/Private/Templates/Validation/Main.html similarity index 79% rename from Resources/Private/Templates/ValidationForm/Main.html rename to Resources/Private/Templates/Validation/Main.html index ad96909af2..9d44d5e06c 100644 --- a/Resources/Private/Templates/ValidationForm/Main.html +++ b/Resources/Private/Templates/Validation/Main.html @@ -15,16 +15,16 @@ {_all} -
+
@@ -35,7 +35,7 @@
- +
diff --git a/Resources/Public/Icons/tx-dlf-validationform.svg b/Resources/Public/Icons/tx-dlf-validation.svg similarity index 98% rename from Resources/Public/Icons/tx-dlf-validationform.svg rename to Resources/Public/Icons/tx-dlf-validation.svg index b2b86fd745..b9e1352cc0 100644 --- a/Resources/Public/Icons/tx-dlf-validationform.svg +++ b/Resources/Public/Icons/tx-dlf-validation.svg @@ -3,7 +3,7 @@ viewBox="0 0 16 16" version="1.1" id="svg3745" - sodipodi:docname="tx-dlf-validationform.svg" + sodipodi:docname="tx-dlf-validation.svg" inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" diff --git a/Resources/Public/JavaScript/ValidationForm/ValidationForm.js b/Resources/Public/JavaScript/Validation/Validation.js similarity index 99% rename from Resources/Public/JavaScript/ValidationForm/ValidationForm.js rename to Resources/Public/JavaScript/Validation/Validation.js index 9d05cdd691..3a1ed403ef 100644 --- a/Resources/Public/JavaScript/ValidationForm/ValidationForm.js +++ b/Resources/Public/JavaScript/Validation/Validation.js @@ -8,7 +8,7 @@ * LICENSE.txt file that was distributed with this source code. */ -const dlfValidationForms = document.querySelectorAll('.tx-dlf-validationform form'); +const dlfValidationForms = document.querySelectorAll('.tx-dlf-validation form'); /** * Get the data from an URL. diff --git a/ext_localconf.php b/ext_localconf.php index b3d8431f58..ffd69720a7 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -32,7 +32,7 @@ 'tx-dlf-statistics' => 'EXT:dlf/Resources/Public/Icons/tx-dlf-statistics.svg', 'tx-dlf-tableofcontents' => 'EXT:dlf/Resources/Public/Icons/tx-dlf-tableofcontents.svg', 'tx-dlf-toolbox' => 'EXT:dlf/Resources/Public/Icons/tx-dlf-toolbox.svg', - 'tx-dlf-validationform' => 'EXT:dlf/Resources/Public/Icons/tx-dlf-validationform.svg', + 'tx-dlf-validation' => 'EXT:dlf/Resources/Public/Icons/tx-dlf-validation.svg', ]; $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \TYPO3\CMS\Core\Imaging\IconRegistry::class @@ -348,13 +348,13 @@ \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( 'Dlf', - 'ValidationForm', + 'Validation', [ - \Kitodo\Dlf\Controller\ValidationFormController::class => 'main', + \Kitodo\Dlf\Controller\ValidationController::class => 'main', ], // non-cacheable actions [ - \Kitodo\Dlf\Controller\ValidationFormController::class => '', + \Kitodo\Dlf\Controller\ValidationController::class => '', ] );