diff --git a/Classes/Service/Image.php b/Classes/Service/Image.php index f6849bd..5c1c32b 100644 --- a/Classes/Service/Image.php +++ b/Classes/Service/Image.php @@ -87,7 +87,7 @@ } $yamlLoader = new YamlFileLoader(); - $formConfiguration = $yamlLoader->load($flexFormArray['data']['sDEF']['lDEF']['settings.persistenceIdentifier']['vDEF']); + $formConfiguration = $yamlLoader->load($file->getPublicUrl()); $captchaProperties = null; foreach ($formConfiguration['renderables'] as $renderable) { @@ -100,8 +100,6 @@ } } - - if ($captchaProperties === null) { throw ElemenIdentifierNotFoundInForm::make('Unable to find a form element with the given identifier: ' . htmlspecialchars($_GET['identifier'])); } diff --git a/Configuration/Yaml/FormEditorSetup.yaml b/Configuration/Yaml/FormEditorSetup.yaml index 72a55b1..1dc6693 100644 --- a/Configuration/Yaml/FormEditorSetup.yaml +++ b/Configuration/Yaml/FormEditorSetup.yaml @@ -86,6 +86,19 @@ TYPO3: EasyCaptchaMixin: formEditor: 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 900: identifier: 'validators' templateName: 'Inspector-ValidatorsEditor' diff --git a/Resources/Public/JavaScript/Frontend/Easycaptcha.js b/Resources/Public/JavaScript/Frontend/Easycaptcha.js index 25d0602..13197ab 100644 --- a/Resources/Public/JavaScript/Frontend/Easycaptcha.js +++ b/Resources/Public/JavaScript/Frontend/Easycaptcha.js @@ -112,10 +112,10 @@ throw new Error('HTTP error [' + response.status + '] for captcha tts request'); } - return response.json().word; + return response.json(); }) - .then(function (word) { - var utterance = new SpeechSynthesisUtterance(word); + .then(function (data) { + var utterance = new SpeechSynthesisUtterance(data.word); utterance.rate = 0.8; utterance.pitch = 1; speechSynthesis.speak(utterance);